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h+ErX7/N9NMYA11EcJlqgdYja7uU/Y9sMKDIIE9h5sdUVou/zfZsukKCG
+zt1H16XMLZ610TwDgrcv
+-----END CERTIFICATE-----
diff --git a/Salesforce.xml b/Salesforce.xml
new file mode 100644
index 0000000..d9e7851
--- /dev/null
+++ b/Salesforce.xml
@@ -0,0 +1 @@
+AZCrBd0WsEodWDT2MxemcURTZ3QkB6+Qi8Z7UjZlKYk=SQWJLtpy53b+LtizaNRAk3h5+FA4axZfGdqEMvoBhSYbWNbgVYwUkF9HqaWKeiow3LFRJ88EIuQf3iLR9qaD06mrTK0ulFIo0/DU+REMZK+IGzJ1bMsstD7L0eBAiICea62iw/dQF4KV64JKvkvp9ZQ+Ithxau4C5Zypj9cr0fg9SjesPJHTNEFSMlpF12o1U6bV7O+48NIkzwxEzQ8snNpqF5kybfp9r64Ltfzcajmd4uR15+X417ZXnie98HJE7egc5zyYiLe6qo+uYh0T2i428Qwg7r+0oSkZi4w5dmSEg249Hb5FjnY3Pe8Q1jCh0W19TXURyi0UQqi2a/Thaw==MIIC8DCCAdigAwIBAgIQf6unXdhk47ZCv3vbgNEZ1jANBgkqhkiG9w0BAQsFADA0MTIwMAYDVQQDEylNaWNyb3NvZnQgQXp1cmUgRmVkZXJhdGVkIFNTTyBDZXJ0aWZpY2F0ZTAeFw0yNDA1MDgwNDQwNDRaFw0yNzA1MDgwNDQwNDRaMDQxMjAwBgNVBAMTKU1pY3Jvc29mdCBBenVyZSBGZWRlcmF0ZWQgU1NPIENlcnRpZmljYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyReHuW5fr1uvA/c7BJARso0zEWr+t1yodFguKyVkSq4xQ8HPGChfaknlZlvuYww75JS90b5nuXwcReHFMPBcZ8P6iCyb3etNYOetX37d3Lj+w14R8hPCxIkbG+r26OWI+Udoge/0gi/Uz24w8q3uy1R1d+gUQrTqafMA9WMBx/pOjjKvSHg/s2nLOv4WcWC1gCRTp12H2ppR9NP3KZ5FZ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iiRz7BcGy6OgVEmE6b8vXTuLO5fkmBc8d7OWdV4s6xyjQChDkN/TyXpTxiQ71TR+O6c1yE37QIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQAe7HVo787amjvc3Op0R45vC4YhDFR5N9v7A6AtUL0JvD4UxXofkUdEF7unRScLfrPKRlsW/ZT5y98WishA/sqZ/CXWHwP5G88xwZO2M+eeXpUfQFhJh1LFoFOhOnvs4aaJP2PC3Xyel72/zdGozut2hQIHrJ4ifYuUFTG5AXayJ1rTARkQ+GdRNezxE9BiyMs0EUIloAoNRu/EiTRXuTcnk1b3o1yi+ADvitrsH7JWkJm4f8b9Ydtbi1pJmk7Qy+ardZNVOuFh+ErX7/N9NMYA11EcJlqgdYja7uU/Y9sMKDIIE9h5sdUVou/zfZsukKCGzt1H16XMLZ610TwDgrcvNameThe mutable display name of the user.SubjectAn immutable, globally unique, non-reusable identifier of the user that is unique to the application for which a token is issued.Given NameFirst name of the user.SurnameLast name of the user.Display NameDisplay name of the user.Nick NameNick name of the user.Authentication InstantThe time (UTC) when the user is authenticated to Windows Azure Active Directory.Authentication MethodThe method that Windows Azure Active Directory uses to authenticate users.ObjectIdentifierPrimary identifier for the user in the directory. Immutable, globally unique, non-reusable.TenantIdIdentifier for the user's tenant.IdentityProviderIdentity provider for the user.EmailEmail address of the user.GroupsGroups of the user.External Access TokenAccess token issued by external identity provider.External Access Token ExpirationUTC expiration time of access token issued by external identity provider.External OpenID 2.0 IdentifierOpenID 2.0 identifier issued by external identity provider.GroupsOverageClaimIssued when number of user's group claims exceeds return limit.Role ClaimRoles that the user or Service Principal is attached toRoleTemplate Id ClaimRole template id of the Built-in Directory Roles that the user is a member ofhttps://login.microsoftonline.com/0085be9c-68bc-4bd8-925e-a15a6d413749/wsfedhttps://login.microsoftonline.com/0085be9c-68bc-4bd8-925e-a15a6d413749/wsfedMIIC8DCCAdigAwIBAgIQf6unXdhk47ZCv3vbgNEZ1jANBgkqhkiG9w0BAQsFADA0MTIwMAYDVQQDEylNaWNyb3NvZnQgQXp1cmUgRmVkZXJhdGVkIFNTTyBDZXJ0aWZpY2F0ZTAeFw0yNDA1MDgwNDQwNDRaFw0yNzA1MDgwNDQwNDRaMDQxMjAwBgNVBAMTKU1pY3Jvc29mdCBBenVyZSBGZWRlcmF0ZWQgU1NPIENlcnRpZmljYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyReHuW5fr1uvA/c7BJARso0zEWr+t1yodFguKyVkSq4xQ8HPGChfaknlZlvuYww75JS90b5nuXwcReHFMPBcZ8P6iCyb3etNYOetX37d3Lj+w14R8hPCxIkbG+r26OWI+Udoge/0gi/Uz24w8q3uy1R1d+gUQrTqafMA9WMBx/pOjjKvSHg/s2nLOv4WcWC1gCRTp12H2ppR9NP3KZ5FZXdJnw0Hvxi18ADIaV+tFvIvvluDaAqdYmGKFWAO1nEsrQjSWx3Lm0DMiiiRz7BcGy6OgVEmE6b8vXTuLO5fkmBc8d7OWdV4s6xyjQChDkN/TyXpTxiQ71TR+O6c1yE37QIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQAe7HVo787amjvc3Op0R45vC4YhDFR5N9v7A6AtUL0JvD4UxXofkUdEF7unRScLfrPKRlsW/ZT5y98WishA/sqZ/CXWHwP5G88xwZO2M+eeXpUfQFhJh1LFoFOhOnvs4aaJP2PC3Xyel72/zdGozut2hQIHrJ4ifYuUFTG5AXayJ1rTARkQ+GdRNezxE9BiyMs0EUIloAoNRu/EiTRXuTcnk1b3o1yi+ADvitrsH7JWkJm4f8b9Ydtbi1pJmk7Qy+ardZNVOuFh+ErX7/N9NMYA11EcJlqgdYja7uU/Y9sMKDIIE9h5sdUVou/zfZsukKCGzt1H16XMLZ610TwDgrcvhttps://sts.windows.net/0085be9c-68bc-4bd8-925e-a15a6d413749/https://login.microsoftonline.com/0085be9c-68bc-4bd8-925e-a15a6d413749/wsfedhttps://login.microsoftonline.com/0085be9c-68bc-4bd8-925e-a15a6d413749/wsfedMIIC8DCCAdigAwIBAgIQf6unXdhk47ZCv3vbgNEZ1jANBgkqhkiG9w0BAQsFADA0MTIwMAYDVQQDEylNaWNyb3NvZnQgQXp1cmUgRmVkZXJhdGVkIFNTTyBDZXJ0aWZpY2F0ZTAeFw0yNDA1MDgwNDQwNDRaFw0yNzA1MDgwNDQwNDRaMDQxMjAwBgNVBAMTKU1pY3Jvc29mdCBBenVyZSBGZWRlcmF0ZWQgU1NPIENlcnRpZmljYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyReHuW5fr1uvA/c7BJARso0zEWr+t1yodFguKyVkSq4xQ8HPGChfaknlZlvuYww75JS90b5nuXwcReHFMPBcZ8P6iCyb3etNYOetX37d3Lj+w14R8hPCxIkbG+r26OWI+Udoge/0gi/Uz24w8q3uy1R1d+gUQrTqafMA9WMBx/pOjjKvSHg/s2nLOv4WcWC1gCRTp12H2ppR9NP3KZ5FZXdJnw0Hvxi18ADIaV+tFvIvvluDaAqdYmGKFWAO1nEsrQjSWx3Lm0DMiiiRz7BcGy6OgVEmE6b8vXTuLO5fkmBc8d7OWdV4s6xyjQChDkN/TyXpTxiQ71TR+O6c1yE37QIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQAe7HVo787amjvc3Op0R45vC4YhDFR5N9v7A6AtUL0JvD4UxXofkUdEF7unRScLfrPKRlsW/ZT5y98WishA/sqZ/CXWHwP5G88xwZO2M+eeXpUfQFhJh1LFoFOhOnvs4aaJP2PC3Xyel72/zdGozut2hQIHrJ4ifYuUFTG5AXayJ1rTARkQ+GdRNezxE9BiyMs0EUIloAoNRu/EiTRXuTcnk1b3o1yi+ADvitrsH7JWkJm4f8b9Ydtbi1pJmk7Qy+ardZNVOuFh+ErX7/N9NMYA11EcJlqgdYja7uU/Y9sMKDIIE9h5sdUVou/zfZsukKCGzt1H16XMLZ610TwDgrcv
\ No newline at end of file
diff --git a/certificate.pem b/certificate.pem
new file mode 100644
index 0000000..7f13d28
--- /d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V2pstl337L7RFchyiPgYMdwkyWs
+uOmX+u1pNZNgjPVMD/C/SR8/Exk2JP0CDSAFd9PiIL5x7n1cdbJKTxpqxqUtu6R0
+MXgQJSU2tIz17B1NbIZ7GSCK7lajv93kZEfVOXvKxlVJpkaIkyUeH5wu4QwqOOh5
+uu1YTeEL3NkwabQ111J3j9loONm0WVQLc6jxo9Thl24mTNgl3vPlTg==
+-----END CERTIFICATE-----
diff --git a/node_modules/.bin/esparse b/node_modules/.bin/esparse
new file mode 120000
index 0000000..7423b18
--- /dev/null
+++ b/node_modules/.bin/esparse
@@ -0,0 +1 @@
+../esprima/bin/esparse.js
\ No newline at end of file
diff --git a/node_modules/.bin/esvalidate b/node_modules/.bin/esvalidate
new file mode 120000
index 0000000..16069ef
--- /dev/null
+++ b/node_modules/.bin/esvalidate
@@ -0,0 +1 @@
+../esprima/bin/esvalidate.js
\ No newline at end of file
diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml
new file mode 120000
index 0000000..9dbd010
--- /dev/null
+++ b/node_modules/.bin/js-yaml
@@ -0,0 +1 @@
+../js-yaml/bin/js-yaml.js
\ No newline at end of file
diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime
new file mode 120000
index 0000000..fbb7ee0
--- /dev/null
+++ b/node_modules/.bin/mime
@@ -0,0 +1 @@
+../mime/cli.js
\ No newline at end of file
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
new file mode 100644
index 0000000..0b40d0b
--- /dev/null
+++ b/node_modules/.package-lock.json
@@ -0,0 +1,884 @@
+{
+ "name": "my-saml-project",
+ "version": "1.0.0",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "node_modules/@oozcitak/dom": {
+ "version": "1.15.8",
+ "resolved": "https://registry.npmjs.org/@oozcitak/dom/-/dom-1.15.8.tgz",
+ "integrity": "sha512-MoOnLBNsF+ok0HjpAvxYxR4piUhRDCEWK0ot3upwOOHYudJd30j6M+LNcE8RKpwfnclAX9T66nXXzkytd29XSw==",
+ "dependencies": {
+ "@oozcitak/infra": "1.0.8",
+ "@oozcitak/url": "1.0.4",
+ "@oozcitak/util": "8.3.8"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/@oozcitak/infra": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/@oozcitak/infra/-/infra-1.0.8.tgz",
+ "integrity": "sha512-JRAUc9VR6IGHOL7OGF+yrvs0LO8SlqGnPAMqyzOuFZPSZSXI7Xf2O9+awQPSMXgIWGtgUf/dA6Hs6X6ySEaWTg==",
+ "dependencies": {
+ "@oozcitak/util": "8.3.8"
+ },
+ "engines": {
+ "node": ">=6.0"
+ }
+ },
+ "node_modules/@oozcitak/url": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@oozcitak/url/-/url-1.0.4.tgz",
+ "integrity": "sha512-kDcD8y+y3FCSOvnBI6HJgl00viO/nGbQoCINmQ0h98OhnGITrWR3bOGfwYCthgcrV8AnTJz8MzslTQbC3SOAmw==",
+ "dependencies": {
+ "@oozcitak/infra": "1.0.8",
+ "@oozcitak/util": "8.3.8"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/@oozcitak/util": {
+ "version": "8.3.8",
+ "resolved": "https://registry.npmjs.org/@oozcitak/util/-/util-8.3.8.tgz",
+ "integrity": "sha512-T8TbSnGsxo6TDBJx/Sgv/BlVJL3tshxZP7Aq5R1mSnM5OcHY2dQaxLMu2+E8u3gN0MLOzdjurqN4ZRVuzQycOQ==",
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "20.12.11",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.11.tgz",
+ "integrity": "sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==",
+ "dependencies": {
+ "undici-types": "~5.26.4"
+ }
+ },
+ "node_modules/@xmldom/xmldom": {
+ "version": "0.8.10",
+ "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
+ "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==",
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "dependencies": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dependencies": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "node_modules/array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
+ },
+ "node_modules/async": {
+ "version": "3.2.5",
+ "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz",
+ "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg=="
+ },
+ "node_modules/body-parser": {
+ "version": "1.20.2",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
+ "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
+ "dependencies": {
+ "bytes": "3.1.2",
+ "content-type": "~1.0.5",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "on-finished": "2.4.1",
+ "qs": "6.11.0",
+ "raw-body": "2.5.2",
+ "type-is": "~1.6.18",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
+ "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
+ "dependencies": {
+ "es-define-property": "^1.0.0",
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.2.4",
+ "set-function-length": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "dependencies": {
+ "safe-buffer": "5.2.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
+ "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
+ },
+ "node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/define-data-property": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
+ "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
+ "dependencies": {
+ "es-define-property": "^1.0.0",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
+ },
+ "node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/es-define-property": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
+ "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
+ "dependencies": {
+ "get-intrinsic": "^1.2.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
+ },
+ "node_modules/esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/express": {
+ "version": "4.19.2",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz",
+ "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==",
+ "dependencies": {
+ "accepts": "~1.3.8",
+ "array-flatten": "1.1.1",
+ "body-parser": "1.20.2",
+ "content-disposition": "0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "0.6.0",
+ "cookie-signature": "1.0.6",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "1.2.0",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "merge-descriptors": "1.0.1",
+ "methods": "~1.1.2",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "0.1.7",
+ "proxy-addr": "~2.0.7",
+ "qs": "6.11.0",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "0.18.0",
+ "serve-static": "1.15.0",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ }
+ },
+ "node_modules/finalhandler": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
+ "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
+ "dependencies": {
+ "debug": "2.6.9",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "statuses": "2.0.1",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
+ "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2",
+ "has-proto": "^1.0.1",
+ "has-symbols": "^1.0.3",
+ "hasown": "^2.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
+ "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
+ "dependencies": {
+ "get-intrinsic": "^1.1.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-property-descriptors": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
+ "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
+ "dependencies": {
+ "es-define-property": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-proto": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
+ "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/http-errors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "dependencies": {
+ "depd": "2.0.0",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "toidentifier": "1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/js-yaml": {
+ "version": "3.14.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
+ "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
+ "dependencies": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/merge-descriptors": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
+ "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
+ },
+ "node_modules/methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
+ },
+ "node_modules/negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/object-inspect": {
+ "version": "1.13.1",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
+ "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-to-regexp": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
+ "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.11.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
+ "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
+ "dependencies": {
+ "side-channel": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
+ "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
+ "dependencies": {
+ "bytes": "3.1.2",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ },
+ "node_modules/saml2-js": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/saml2-js/-/saml2-js-4.0.2.tgz",
+ "integrity": "sha512-03EEy/d55+4Ltl6jXAcRY1Fkrcpwt3K6a0T4N4Bfq5IKu9TbJqYG5AoXSi1P4lKvwvxQ99v5RPeoffSsumRrEg==",
+ "dependencies": {
+ "@xmldom/xmldom": "^0.8.6",
+ "async": "^3.2.0",
+ "debug": "^4.3.0",
+ "underscore": "^1.8.0",
+ "xml-crypto": "^3.0.1",
+ "xml-encryption": "^3.0.2",
+ "xmlbuilder2": "^2.4.0"
+ },
+ "engines": {
+ "node": ">=10.x"
+ }
+ },
+ "node_modules/saml2-js/node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/saml2-js/node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
+ "node_modules/send": {
+ "version": "0.18.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
+ "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
+ "dependencies": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/send/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ },
+ "node_modules/serve-static": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
+ "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
+ "dependencies": {
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "0.18.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/set-function-length": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
+ "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
+ "dependencies": {
+ "define-data-property": "^1.1.4",
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.2.4",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
+ },
+ "node_modules/side-channel": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
+ "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.4",
+ "object-inspect": "^1.13.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="
+ },
+ "node_modules/statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/underscore": {
+ "version": "1.13.6",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz",
+ "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A=="
+ },
+ "node_modules/undici-types": {
+ "version": "5.26.5",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
+ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/xml-crypto": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-3.2.0.tgz",
+ "integrity": "sha512-qVurBUOQrmvlgmZqIVBqmb06TD2a/PpEUfFPgD7BuBfjmoH4zgkqaWSIJrnymlCvM2GGt9x+XtJFA+ttoAufqg==",
+ "dependencies": {
+ "@xmldom/xmldom": "^0.8.8",
+ "xpath": "0.0.32"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/xml-encryption": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-3.0.2.tgz",
+ "integrity": "sha512-VxYXPvsWB01/aqVLd6ZMPWZ+qaj0aIdF+cStrVJMcFj3iymwZeI0ABzB3VqMYv48DkSpRhnrXqTUkR34j+UDyg==",
+ "dependencies": {
+ "@xmldom/xmldom": "^0.8.5",
+ "escape-html": "^1.0.3",
+ "xpath": "0.0.32"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/xmlbuilder2": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/xmlbuilder2/-/xmlbuilder2-2.4.1.tgz",
+ "integrity": "sha512-vliUplZsk5vJnhxXN/mRcij/AE24NObTUm/Zo4vkLusgayO6s3Et5zLEA14XZnY1c3hX5o1ToR0m0BJOPy0UvQ==",
+ "dependencies": {
+ "@oozcitak/dom": "1.15.8",
+ "@oozcitak/infra": "1.0.8",
+ "@oozcitak/util": "8.3.8",
+ "@types/node": "*",
+ "js-yaml": "3.14.0"
+ },
+ "engines": {
+ "node": ">=10.0"
+ }
+ },
+ "node_modules/xpath": {
+ "version": "0.0.32",
+ "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz",
+ "integrity": "sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw==",
+ "engines": {
+ "node": ">=0.6.0"
+ }
+ }
+ }
+}
diff --git a/node_modules/@oozcitak/dom/LICENSE b/node_modules/@oozcitak/dom/LICENSE
new file mode 100644
index 0000000..eee50f6
--- /dev/null
+++ b/node_modules/@oozcitak/dom/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 Ozgur Ozcitak
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@oozcitak/dom/README.md b/node_modules/@oozcitak/dom/README.md
new file mode 100644
index 0000000..b302b05
--- /dev/null
+++ b/node_modules/@oozcitak/dom/README.md
@@ -0,0 +1,32 @@
+# DOM
+A Javascript implementation of the [DOM Living Standard](https://dom.spec.whatwg.org/).
+
+[![License](http://img.shields.io/npm/l/@oozcitak/dom.svg?style=flat-square)](http://opensource.org/licenses/MIT)
+[![NPM Version](https://img.shields.io/npm/v/@oozcitak/dom?logo=npm&style=flat-square)](https://www.npmjs.com/package/@oozcitak/dom)
+
+[![Travis Build Status](https://img.shields.io/travis/oozcitak/dom?logo=travis&style=flat-square)](http://travis-ci.org/oozcitak/dom)
+[![AppVeyor Build status](https://img.shields.io/appveyor/ci/oozcitak/dom?logo=appveyor&style=flat-square)](https://ci.appveyor.com/project/oozcitak/dom)
+[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/dom.svg?style=flat-square)](https://david-dm.org/oozcitak/dom)
+[![Code Coverage](https://img.shields.io/codecov/c/github/oozcitak/dom?logo=codecov&style=flat-square)](https://codecov.io/gh/oozcitak/dom)
+
+# Version
+Current version implements the standard as of commit [57512fa](https://dom.spec.whatwg.org/commit-snapshots/57512fac17cf2f1c4c85be4aec178c8086ee5ee4/) (Last Updated 24 September 2019).
+
+This DOM implementation is for _XML documents only_.
+
+# Installation
+```
+npm install @oozcitak/dom
+```
+
+# Usage
+Create an instance of the [`DOMImplementation`](https://dom.spec.whatwg.org/#interface-domimplementation) class to construct the DOM tree.
+
+```js
+const { DOMImplementation } = require("@oozcitak/dom");
+
+const dom = new DOMImplementation();
+const doc = dom.createDocument('ns', 'root');
+```
+
+The module also exports [`DOMParser`](https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparser) and [`XMLSerializer`](https://w3c.github.io/DOM-Parsing/#the-xmlserializer-interface) classes as in the browser.
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.d.ts
new file mode 100644
index 0000000..c96e395
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.d.ts
@@ -0,0 +1,21 @@
+import { AbortSignal } from "../dom/interfaces";
+/**
+ * Adds an algorithm to the given abort signal.
+ *
+ * @param algorithm - an algorithm
+ * @param signal - abort signal
+ */
+export declare function abort_add(algorithm: ((...args: any[]) => any), signal: AbortSignal): void;
+/**
+ * Removes an algorithm from the given abort signal.
+ *
+ * @param algorithm - an algorithm
+ * @param signal - abort signal
+ */
+export declare function abort_remove(algorithm: ((...args: any[]) => any), signal: AbortSignal): void;
+/**
+ * Signals abort on the given abort signal.
+ *
+ * @param signal - abort signal
+ */
+export declare function abort_signalAbort(signal: AbortSignal): void;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js
new file mode 100644
index 0000000..94614d6
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js
@@ -0,0 +1,79 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var EventAlgorithm_1 = require("./EventAlgorithm");
+/**
+ * Adds an algorithm to the given abort signal.
+ *
+ * @param algorithm - an algorithm
+ * @param signal - abort signal
+ */
+function abort_add(algorithm, signal) {
+ /**
+ * 1. If signal’s aborted flag is set, then return.
+ * 2. Append algorithm to signal’s abort algorithms.
+ */
+ if (signal._abortedFlag)
+ return;
+ signal._abortAlgorithms.add(algorithm);
+}
+exports.abort_add = abort_add;
+/**
+ * Removes an algorithm from the given abort signal.
+ *
+ * @param algorithm - an algorithm
+ * @param signal - abort signal
+ */
+function abort_remove(algorithm, signal) {
+ /**
+ * To remove an algorithm algorithm from an AbortSignal signal, remove
+ * algorithm from signal’s abort algorithms.
+ */
+ signal._abortAlgorithms.delete(algorithm);
+}
+exports.abort_remove = abort_remove;
+/**
+ * Signals abort on the given abort signal.
+ *
+ * @param signal - abort signal
+ */
+function abort_signalAbort(signal) {
+ var e_1, _a;
+ /**
+ * 1. If signal’s aborted flag is set, then return.
+ * 2. Set signal’s aborted flag.
+ * 3. For each algorithm in signal’s abort algorithms: run algorithm.
+ * 4. Empty signal’s abort algorithms.
+ * 5. Fire an event named abort at signal.
+ */
+ if (signal._abortedFlag)
+ return;
+ signal._abortedFlag = true;
+ try {
+ for (var _b = __values(signal._abortAlgorithms), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var algorithm = _c.value;
+ algorithm.call(signal);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ signal._abortAlgorithms.clear();
+ EventAlgorithm_1.event_fireAnEvent("abort", signal);
+}
+exports.abort_signalAbort = abort_signalAbort;
+//# sourceMappingURL=AbortAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js.map
new file mode 100644
index 0000000..9954d1f
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"AbortAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/AbortAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,mDAAoD;AAEpD;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,SAAoC,EAAE,MAAmB;IACjF;;;OAGG;IACH,IAAI,MAAM,CAAC,YAAY;QAAE,OAAM;IAC/B,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;AACxC,CAAC;AAPD,8BAOC;AAED;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,SAAoC,EAAE,MAAmB;IACpF;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;AAC3C,CAAC;AAND,oCAMC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,MAAmB;;IACnD;;;;;;OAMG;IACH,IAAI,MAAM,CAAC,YAAY;QAAE,OAAM;IAC/B,MAAM,CAAC,YAAY,GAAG,IAAI,CAAA;;QAC1B,KAAwB,IAAA,KAAA,SAAA,MAAM,CAAC,gBAAgB,CAAA,gBAAA,4BAAE;YAA5C,IAAM,SAAS,WAAA;YAClB,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;SACvB;;;;;;;;;IACD,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAA;IAC/B,kCAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;AACpC,CAAC;AAfD,8CAeC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.d.ts
new file mode 100644
index 0000000..3288e80
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.d.ts
@@ -0,0 +1,8 @@
+import { Attr } from "../dom/interfaces";
+/**
+ * Changes the value of an existing attribute.
+ *
+ * @param attribute - an attribute node
+ * @param value - attribute value
+ */
+export declare function attr_setAnExistingAttributeValue(attribute: Attr, value: string): void;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js
new file mode 100644
index 0000000..6dc6f10
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js
@@ -0,0 +1,23 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var ElementAlgorithm_1 = require("./ElementAlgorithm");
+/**
+ * Changes the value of an existing attribute.
+ *
+ * @param attribute - an attribute node
+ * @param value - attribute value
+ */
+function attr_setAnExistingAttributeValue(attribute, value) {
+ /**
+ * 1. If attribute’s element is null, then set attribute’s value to value.
+ * 2. Otherwise, change attribute from attribute’s element to value.
+ */
+ if (attribute._element === null) {
+ attribute._value = value;
+ }
+ else {
+ ElementAlgorithm_1.element_change(attribute, attribute._element, value);
+ }
+}
+exports.attr_setAnExistingAttributeValue = attr_setAnExistingAttributeValue;
+//# sourceMappingURL=AttrAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js.map
new file mode 100644
index 0000000..8f19893
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"AttrAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/AttrAlgorithm.ts"],"names":[],"mappings":";;AACA,uDAAmD;AAEnD;;;;;GAKG;AACH,SAAgB,gCAAgC,CAAC,SAAe,EAAE,KAAa;IAC7E;;;OAGG;IACH,IAAI,SAAS,CAAC,QAAQ,KAAK,IAAI,EAAE;QAC/B,SAAS,CAAC,MAAM,GAAG,KAAK,CAAA;KACzB;SAAM;QACL,iCAAc,CAAC,SAAS,EAAE,SAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;KACrD;AACH,CAAC;AAVD,4EAUC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.d.ts
new file mode 100644
index 0000000..cdff768
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.d.ts
@@ -0,0 +1,8 @@
+import { BoundaryPoint, BoundaryPosition } from "../dom/interfaces";
+/**
+ * Defines the position of a boundary point relative to another.
+ *
+ * @param bp - a boundary point
+ * @param relativeTo - a boundary point to compare to
+ */
+export declare function boundaryPoint_position(bp: BoundaryPoint, relativeTo: BoundaryPoint): BoundaryPosition;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js
new file mode 100644
index 0000000..83e10de
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js
@@ -0,0 +1,76 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("../dom/interfaces");
+var TreeAlgorithm_1 = require("./TreeAlgorithm");
+/**
+ * Defines the position of a boundary point relative to another.
+ *
+ * @param bp - a boundary point
+ * @param relativeTo - a boundary point to compare to
+ */
+function boundaryPoint_position(bp, relativeTo) {
+ var nodeA = bp[0];
+ var offsetA = bp[1];
+ var nodeB = relativeTo[0];
+ var offsetB = relativeTo[1];
+ /**
+ * 1. Assert: nodeA and nodeB have the same root.
+ */
+ console.assert(TreeAlgorithm_1.tree_rootNode(nodeA) === TreeAlgorithm_1.tree_rootNode(nodeB), "Boundary points must share the same root node.");
+ /**
+ * 2. If nodeA is nodeB, then return equal if offsetA is offsetB, before
+ * if offsetA is less than offsetB, and after if offsetA is greater than
+ * offsetB.
+ */
+ if (nodeA === nodeB) {
+ if (offsetA === offsetB) {
+ return interfaces_1.BoundaryPosition.Equal;
+ }
+ else if (offsetA < offsetB) {
+ return interfaces_1.BoundaryPosition.Before;
+ }
+ else {
+ return interfaces_1.BoundaryPosition.After;
+ }
+ }
+ /**
+ * 3. If nodeA is following nodeB, then if the position of (nodeB, offsetB)
+ * relative to (nodeA, offsetA) is before, return after, and if it is after,
+ * return before.
+ */
+ if (TreeAlgorithm_1.tree_isFollowing(nodeB, nodeA)) {
+ var pos = boundaryPoint_position([nodeB, offsetB], [nodeA, offsetA]);
+ if (pos === interfaces_1.BoundaryPosition.Before) {
+ return interfaces_1.BoundaryPosition.After;
+ }
+ else if (pos === interfaces_1.BoundaryPosition.After) {
+ return interfaces_1.BoundaryPosition.Before;
+ }
+ }
+ /**
+ * 4. If nodeA is an ancestor of nodeB:
+ */
+ if (TreeAlgorithm_1.tree_isAncestorOf(nodeB, nodeA)) {
+ /**
+ * 4.1. Let child be nodeB.
+ * 4.2. While child is not a child of nodeA, set child to its parent.
+ * 4.3. If child’s index is less than offsetA, then return after.
+ */
+ var child = nodeB;
+ while (!TreeAlgorithm_1.tree_isChildOf(nodeA, child)) {
+ /* istanbul ignore else */
+ if (child._parent !== null) {
+ child = child._parent;
+ }
+ }
+ if (TreeAlgorithm_1.tree_index(child) < offsetA) {
+ return interfaces_1.BoundaryPosition.After;
+ }
+ }
+ /**
+ * 5. Return before.
+ */
+ return interfaces_1.BoundaryPosition.Before;
+}
+exports.boundaryPoint_position = boundaryPoint_position;
+//# sourceMappingURL=BoundaryPointAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js.map
new file mode 100644
index 0000000..6749cc7
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"BoundaryPointAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/BoundaryPointAlgorithm.ts"],"names":[],"mappings":";;AAAA,gDAAmE;AACnE,iDAGwB;AAExB;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,EAAiB,EAAE,UAAyB;IAEjF,IAAM,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,CAAA;IACnB,IAAM,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,CAAA;IACrB,IAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,CAAA;IAC3B,IAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAA;IAE7B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,6BAAa,CAAC,KAAK,CAAC,KAAK,6BAAa,CAAC,KAAK,CAAC,EAC1D,gDAAgD,CAAC,CAAA;IAEnD;;;;OAIG;IACH,IAAI,KAAK,KAAK,KAAK,EAAE;QACnB,IAAI,OAAO,KAAK,OAAO,EAAE;YACvB,OAAO,6BAAgB,CAAC,KAAK,CAAA;SAC9B;aAAM,IAAI,OAAO,GAAG,OAAO,EAAE;YAC5B,OAAO,6BAAgB,CAAC,MAAM,CAAA;SAC/B;aAAM;YACL,OAAO,6BAAgB,CAAC,KAAK,CAAA;SAC9B;KACF;IAED;;;;OAIG;IACH,IAAI,gCAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;QAClC,IAAM,GAAG,GAAG,sBAAsB,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAA;QACtE,IAAI,GAAG,KAAK,6BAAgB,CAAC,MAAM,EAAE;YACnC,OAAO,6BAAgB,CAAC,KAAK,CAAA;SAC9B;aAAM,IAAI,GAAG,KAAK,6BAAgB,CAAC,KAAK,EAAE;YACzC,OAAO,6BAAgB,CAAC,MAAM,CAAA;SAC/B;KACF;IAED;;OAEG;IACH,IAAI,iCAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;QACnC;;;;WAIG;QACH,IAAI,KAAK,GAAG,KAAK,CAAA;QAEjB,OAAO,CAAC,8BAAc,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;YACpC,0BAA0B;YAC1B,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE;gBAC1B,KAAK,GAAG,KAAK,CAAC,OAAO,CAAA;aACtB;SACF;QAED,IAAI,0BAAU,CAAC,KAAK,CAAC,GAAG,OAAO,EAAE;YAC/B,OAAO,6BAAgB,CAAC,KAAK,CAAA;SAC9B;KACF;IAED;;OAEG;IACH,OAAO,6BAAgB,CAAC,MAAM,CAAA;AAChC,CAAC;AArED,wDAqEC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.d.ts
new file mode 100644
index 0000000..255b8f6
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.d.ts
@@ -0,0 +1,19 @@
+import { CharacterData } from "../dom/interfaces";
+/**
+ * Replaces character data.
+ *
+ * @param node - a character data node
+ * @param offset - start offset
+ * @param count - count of characters to replace
+ * @param data - new data
+ */
+export declare function characterData_replaceData(node: CharacterData, offset: number, count: number, data: string): void;
+/**
+ * Returns `count` number of characters from `node`'s data starting at
+ * the given `offset`.
+ *
+ * @param node - a character data node
+ * @param offset - start offset
+ * @param count - count of characters to return
+ */
+export declare function characterData_substringData(node: CharacterData, offset: number, count: number): string;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js
new file mode 100644
index 0000000..83a7f40
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js
@@ -0,0 +1,140 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("../dom/DOMImpl");
+var util_1 = require("../util");
+var DOMException_1 = require("../dom/DOMException");
+var TreeAlgorithm_1 = require("./TreeAlgorithm");
+var MutationObserverAlgorithm_1 = require("./MutationObserverAlgorithm");
+var DOMAlgorithm_1 = require("./DOMAlgorithm");
+/**
+ * Replaces character data.
+ *
+ * @param node - a character data node
+ * @param offset - start offset
+ * @param count - count of characters to replace
+ * @param data - new data
+ */
+function characterData_replaceData(node, offset, count, data) {
+ var e_1, _a;
+ /**
+ * 1. Let length be node’s length.
+ * 2. If offset is greater than length, then throw an "IndexSizeError"
+ * DOMException.
+ * 3. If offset plus count is greater than length, then set count to length
+ * minus offset.
+ */
+ var length = TreeAlgorithm_1.tree_nodeLength(node);
+ if (offset > length) {
+ throw new DOMException_1.IndexSizeError("Offset exceeds character data length. Offset: " + offset + ", Length: " + length + ", Node is " + node.nodeName + ".");
+ }
+ if (offset + count > length) {
+ count = length - offset;
+ }
+ /**
+ * 4. Queue a mutation record of "characterData" for node with null, null,
+ * node’s data, « », « », null, and null.
+ */
+ if (DOMImpl_1.dom.features.mutationObservers) {
+ MutationObserverAlgorithm_1.observer_queueMutationRecord("characterData", node, null, null, node._data, [], [], null, null);
+ }
+ /**
+ * 5. Insert data into node’s data after offset code units.
+ * 6. Let delete offset be offset + data’s length.
+ * 7. Starting from delete offset code units, remove count code units from
+ * node’s data.
+ */
+ var newData = node._data.substring(0, offset) + data +
+ node._data.substring(offset + count);
+ node._data = newData;
+ try {
+ /**
+ * 8. For each live range whose start node is node and start offset is
+ * greater than offset but less than or equal to offset plus count, set its
+ * start offset to offset.
+ * 9. For each live range whose end node is node and end offset is greater
+ * than offset but less than or equal to offset plus count, set its end
+ * offset to offset.
+ * 10. For each live range whose start node is node and start offset is
+ * greater than offset plus count, increase its start offset by data’s
+ * length and decrease it by count.
+ * 11. For each live range whose end node is node and end offset is greater
+ * than offset plus count, increase its end offset by data’s length and
+ * decrease it by count.
+ */
+ for (var _b = __values(DOMImpl_1.dom.rangeList), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var range = _c.value;
+ if (range._start[0] === node && range._start[1] > offset && range._start[1] <= offset + count) {
+ range._start[1] = offset;
+ }
+ if (range._end[0] === node && range._end[1] > offset && range._end[1] <= offset + count) {
+ range._end[1] = offset;
+ }
+ if (range._start[0] === node && range._start[1] > offset + count) {
+ range._start[1] += data.length - count;
+ }
+ if (range._end[0] === node && range._end[1] > offset + count) {
+ range._end[1] += data.length - count;
+ }
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ /**
+ * 12. If node is a Text node and its parent is not null, run the child
+ * text content change steps for node’s parent.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ if (util_1.Guard.isTextNode(node) && node._parent !== null) {
+ DOMAlgorithm_1.dom_runChildTextContentChangeSteps(node._parent);
+ }
+ }
+}
+exports.characterData_replaceData = characterData_replaceData;
+/**
+ * Returns `count` number of characters from `node`'s data starting at
+ * the given `offset`.
+ *
+ * @param node - a character data node
+ * @param offset - start offset
+ * @param count - count of characters to return
+ */
+function characterData_substringData(node, offset, count) {
+ /**
+ * 1. Let length be node’s length.
+ * 2. If offset is greater than length, then throw an "IndexSizeError"
+ * DOMException.
+ * 3. If offset plus count is greater than length, return a string whose
+ * value is the code units from the offsetth code unit to the end of node’s
+ * data, and then return.
+ * 4. Return a string whose value is the code units from the offsetth code
+ * unit to the offset+countth code unit in node’s data.
+ */
+ var length = TreeAlgorithm_1.tree_nodeLength(node);
+ if (offset > length) {
+ throw new DOMException_1.IndexSizeError("Offset exceeds character data length. Offset: " + offset + ", Length: " + length + ", Node is " + node.nodeName + ".");
+ }
+ if (offset + count > length) {
+ return node._data.substr(offset);
+ }
+ else {
+ return node._data.substr(offset, count);
+ }
+}
+exports.characterData_substringData = characterData_substringData;
+//# sourceMappingURL=CharacterDataAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js.map
new file mode 100644
index 0000000..e693b9e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"CharacterDataAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/CharacterDataAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,0CAAoC;AAEpC,gCAA+B;AAC/B,oDAAoD;AACpD,iDAAiD;AACjD,yEAA0E;AAC1E,+CAAmE;AAEnE;;;;;;;GAOG;AACH,SAAgB,yBAAyB,CAAC,IAAmB,EAAE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AE;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;KACjC;SAAM;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;KACxC;AACH,CAAC;AAtBD,kEAsBC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.d.ts
new file mode 100644
index 0000000..2ecceb7
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.d.ts
@@ -0,0 +1,192 @@
+import { Document, DOMImplementation, Window, XMLDocument, AbortController, AbortSignal, DocumentType, Element, DocumentFragment, ShadowRoot, Attr, Text, CDATASection, Comment, ProcessingInstruction, Node, HTMLCollection, NodeList, NamedNodeMap, BoundaryPoint, Range, NodeIterator, TreeWalker, NodeFilter, MutationRecord, DOMTokenList } from "../dom/interfaces";
+/**
+ * Creates a `DOMImplementation`.
+ *
+ * @param document - associated document
+ */
+export declare function create_domImplementation(document: Document): DOMImplementation;
+/**
+ * Creates a `Window` node.
+ */
+export declare function create_window(): Window;
+/**
+ * Creates an `XMLDocument` node.
+ */
+export declare function create_xmlDocument(): XMLDocument;
+/**
+ * Creates a `Document` node.
+ */
+export declare function create_document(): Document;
+/**
+ * Creates an `AbortController`.
+ */
+export declare function create_abortController(): AbortController;
+/**
+ * Creates an `AbortSignal`.
+ */
+export declare function create_abortSignal(): AbortSignal;
+/**
+ * Creates a `DocumentType` node.
+ *
+ * @param document - owner document
+ * @param name - name of the node
+ * @param publicId - `PUBLIC` identifier
+ * @param systemId - `SYSTEM` identifier
+ */
+export declare function create_documentType(document: Document, name: string, publicId: string, systemId: string): DocumentType;
+/**
+ * Creates a new `Element` node.
+ *
+ * @param document - owner document
+ * @param localName - local name
+ * @param namespace - namespace
+ * @param prefix - namespace prefix
+ */
+export declare function create_element(document: Document, localName: string, namespace: string | null, prefix: string | null): Element;
+/**
+ * Creates a new `HTMLElement` node.
+ *
+ * @param document - owner document
+ * @param localName - local name
+ * @param namespace - namespace
+ * @param prefix - namespace prefix
+ */
+export declare function create_htmlElement(document: Document, localName: string, namespace: string | null, prefix: string | null): Element;
+/**
+ * Creates a new `HTMLUnknownElement` node.
+ *
+ * @param document - owner document
+ * @param localName - local name
+ * @param namespace - namespace
+ * @param prefix - namespace prefix
+ */
+export declare function create_htmlUnknownElement(document: Document, localName: string, namespace: string | null, prefix: string | null): Element;
+/**
+ * Creates a new `DocumentFragment` node.
+ *
+ * @param document - owner document
+ */
+export declare function create_documentFragment(document: Document): DocumentFragment;
+/**
+ * Creates a new `ShadowRoot` node.
+ *
+ * @param document - owner document
+ * @param host - shadow root's host element node
+ */
+export declare function create_shadowRoot(document: Document, host: Element): ShadowRoot;
+/**
+ * Creates a new `Attr` node.
+ *
+ * @param document - owner document
+ * @param localName - local name
+ */
+export declare function create_attr(document: Document, localName: string): Attr;
+/**
+ * Creates a new `Text` node.
+ *
+ * @param document - owner document
+ * @param data - node contents
+ */
+export declare function create_text(document: Document, data: string): Text;
+/**
+ * Creates a new `CDATASection` node.
+ *
+ * @param document - owner document
+ * @param data - node contents
+ */
+export declare function create_cdataSection(document: Document, data: string): CDATASection;
+/**
+ * Creates a new `Comment` node.
+ *
+ * @param document - owner document
+ * @param data - node contents
+ */
+export declare function create_comment(document: Document, data: string): Comment;
+/**
+ * Creates a new `ProcessingInstruction` node.
+ *
+ * @param document - owner document
+ * @param target - instruction target
+ * @param data - node contents
+ */
+export declare function create_processingInstruction(document: Document, target: string, data: string): ProcessingInstruction;
+/**
+ * Creates a new `HTMLCollection`.
+ *
+ * @param root - root node
+ * @param filter - node filter
+ */
+export declare function create_htmlCollection(root: Node, filter?: ((element: Element) => any)): HTMLCollection;
+/**
+ * Creates a new live `NodeList`.
+ *
+ * @param root - root node
+ */
+export declare function create_nodeList(root: Node): NodeList;
+/**
+ * Creates a new static `NodeList`.
+ *
+ * @param root - root node
+ * @param items - a list of items to initialize the list
+ */
+export declare function create_nodeListStatic(root: Node, items: Node[]): NodeList;
+/**
+ * Creates a new `NamedNodeMap`.
+ *
+ * @param element - parent element
+ */
+export declare function create_namedNodeMap(element: Element): NamedNodeMap;
+/**
+ * Creates a new `Range`.
+ *
+ * @param start - start point
+ * @param end - end point
+ */
+export declare function create_range(start?: BoundaryPoint, end?: BoundaryPoint): Range;
+/**
+ * Creates a new `NodeIterator`.
+ *
+ * @param root - iterator's root node
+ * @param reference - reference node
+ * @param pointerBeforeReference - whether the iterator is before or after the
+ * reference node
+ */
+export declare function create_nodeIterator(root: Node, reference: Node, pointerBeforeReference: boolean): NodeIterator;
+/**
+ * Creates a new `TreeWalker`.
+ *
+ * @param root - iterator's root node
+ * @param current - current node
+ */
+export declare function create_treeWalker(root: Node, current: Node): TreeWalker;
+/**
+ * Creates a new `NodeFilter`.
+ */
+export declare function create_nodeFilter(): NodeFilter;
+/**
+ * Creates a new `MutationRecord`.
+ *
+ * @param type - type of mutation: `"attributes"` for an attribute
+ * mutation, `"characterData"` for a mutation to a CharacterData node
+ * and `"childList"` for a mutation to the tree of nodes.
+ * @param target - node affected by the mutation.
+ * @param addedNodes - list of added nodes.
+ * @param removedNodes - list of removed nodes.
+ * @param previousSibling - previous sibling of added or removed nodes.
+ * @param nextSibling - next sibling of added or removed nodes.
+ * @param attributeName - local name of the changed attribute,
+ * and `null` otherwise.
+ * @param attributeNamespace - namespace of the changed attribute,
+ * and `null` otherwise.
+ * @param oldValue - value before mutation: attribute value for an attribute
+ * mutation, node `data` for a mutation to a CharacterData node and `null`
+ * for a mutation to the tree of nodes.
+ */
+export declare function create_mutationRecord(type: "attributes" | "characterData" | "childList", target: Node, addedNodes: NodeList, removedNodes: NodeList, previousSibling: Node | null, nextSibling: Node | null, attributeName: string | null, attributeNamespace: string | null, oldValue: string | null): MutationRecord;
+/**
+ * Creates a new `DOMTokenList`.
+ *
+ * @param element - associated element
+ * @param attribute - associated attribute
+ */
+export declare function create_domTokenList(element: Element, attribute: Attr): DOMTokenList;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js
new file mode 100644
index 0000000..425b3df
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js
@@ -0,0 +1,303 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImplementationImpl_1 = require("../dom/DOMImplementationImpl");
+var WindowImpl_1 = require("../dom/WindowImpl");
+var XMLDocumentImpl_1 = require("../dom/XMLDocumentImpl");
+var DocumentImpl_1 = require("../dom/DocumentImpl");
+var AbortControllerImpl_1 = require("../dom/AbortControllerImpl");
+var AbortSignalImpl_1 = require("../dom/AbortSignalImpl");
+var DocumentTypeImpl_1 = require("../dom/DocumentTypeImpl");
+var ElementImpl_1 = require("../dom/ElementImpl");
+var DocumentFragmentImpl_1 = require("../dom/DocumentFragmentImpl");
+var ShadowRootImpl_1 = require("../dom/ShadowRootImpl");
+var AttrImpl_1 = require("../dom/AttrImpl");
+var TextImpl_1 = require("../dom/TextImpl");
+var CDATASectionImpl_1 = require("../dom/CDATASectionImpl");
+var CommentImpl_1 = require("../dom/CommentImpl");
+var ProcessingInstructionImpl_1 = require("../dom/ProcessingInstructionImpl");
+var HTMLCollectionImpl_1 = require("../dom/HTMLCollectionImpl");
+var NodeListImpl_1 = require("../dom/NodeListImpl");
+var NodeListStaticImpl_1 = require("../dom/NodeListStaticImpl");
+var NamedNodeMapImpl_1 = require("../dom/NamedNodeMapImpl");
+var RangeImpl_1 = require("../dom/RangeImpl");
+var NodeIteratorImpl_1 = require("../dom/NodeIteratorImpl");
+var TreeWalkerImpl_1 = require("../dom/TreeWalkerImpl");
+var NodeFilterImpl_1 = require("../dom/NodeFilterImpl");
+var MutationRecordImpl_1 = require("../dom/MutationRecordImpl");
+var DOMTokenListImpl_1 = require("../dom/DOMTokenListImpl");
+/**
+ * Creates a `DOMImplementation`.
+ *
+ * @param document - associated document
+ */
+function create_domImplementation(document) {
+ return DOMImplementationImpl_1.DOMImplementationImpl._create(document);
+}
+exports.create_domImplementation = create_domImplementation;
+/**
+ * Creates a `Window` node.
+ */
+function create_window() {
+ return WindowImpl_1.WindowImpl._create();
+}
+exports.create_window = create_window;
+/**
+ * Creates an `XMLDocument` node.
+ */
+function create_xmlDocument() {
+ return new XMLDocumentImpl_1.XMLDocumentImpl();
+}
+exports.create_xmlDocument = create_xmlDocument;
+/**
+ * Creates a `Document` node.
+ */
+function create_document() {
+ return new DocumentImpl_1.DocumentImpl();
+}
+exports.create_document = create_document;
+/**
+ * Creates an `AbortController`.
+ */
+function create_abortController() {
+ return new AbortControllerImpl_1.AbortControllerImpl();
+}
+exports.create_abortController = create_abortController;
+/**
+ * Creates an `AbortSignal`.
+ */
+function create_abortSignal() {
+ return AbortSignalImpl_1.AbortSignalImpl._create();
+}
+exports.create_abortSignal = create_abortSignal;
+/**
+ * Creates a `DocumentType` node.
+ *
+ * @param document - owner document
+ * @param name - name of the node
+ * @param publicId - `PUBLIC` identifier
+ * @param systemId - `SYSTEM` identifier
+ */
+function create_documentType(document, name, publicId, systemId) {
+ return DocumentTypeImpl_1.DocumentTypeImpl._create(document, name, publicId, systemId);
+}
+exports.create_documentType = create_documentType;
+/**
+ * Creates a new `Element` node.
+ *
+ * @param document - owner document
+ * @param localName - local name
+ * @param namespace - namespace
+ * @param prefix - namespace prefix
+ */
+function create_element(document, localName, namespace, prefix) {
+ return ElementImpl_1.ElementImpl._create(document, localName, namespace, prefix);
+}
+exports.create_element = create_element;
+/**
+ * Creates a new `HTMLElement` node.
+ *
+ * @param document - owner document
+ * @param localName - local name
+ * @param namespace - namespace
+ * @param prefix - namespace prefix
+ */
+function create_htmlElement(document, localName, namespace, prefix) {
+ // TODO: Implement in HTML DOM
+ return ElementImpl_1.ElementImpl._create(document, localName, namespace, prefix);
+}
+exports.create_htmlElement = create_htmlElement;
+/**
+ * Creates a new `HTMLUnknownElement` node.
+ *
+ * @param document - owner document
+ * @param localName - local name
+ * @param namespace - namespace
+ * @param prefix - namespace prefix
+ */
+function create_htmlUnknownElement(document, localName, namespace, prefix) {
+ // TODO: Implement in HTML DOM
+ return ElementImpl_1.ElementImpl._create(document, localName, namespace, prefix);
+}
+exports.create_htmlUnknownElement = create_htmlUnknownElement;
+/**
+ * Creates a new `DocumentFragment` node.
+ *
+ * @param document - owner document
+ */
+function create_documentFragment(document) {
+ return DocumentFragmentImpl_1.DocumentFragmentImpl._create(document);
+}
+exports.create_documentFragment = create_documentFragment;
+/**
+ * Creates a new `ShadowRoot` node.
+ *
+ * @param document - owner document
+ * @param host - shadow root's host element node
+ */
+function create_shadowRoot(document, host) {
+ return ShadowRootImpl_1.ShadowRootImpl._create(document, host);
+}
+exports.create_shadowRoot = create_shadowRoot;
+/**
+ * Creates a new `Attr` node.
+ *
+ * @param document - owner document
+ * @param localName - local name
+ */
+function create_attr(document, localName) {
+ return AttrImpl_1.AttrImpl._create(document, localName);
+}
+exports.create_attr = create_attr;
+/**
+ * Creates a new `Text` node.
+ *
+ * @param document - owner document
+ * @param data - node contents
+ */
+function create_text(document, data) {
+ return TextImpl_1.TextImpl._create(document, data);
+}
+exports.create_text = create_text;
+/**
+ * Creates a new `CDATASection` node.
+ *
+ * @param document - owner document
+ * @param data - node contents
+ */
+function create_cdataSection(document, data) {
+ return CDATASectionImpl_1.CDATASectionImpl._create(document, data);
+}
+exports.create_cdataSection = create_cdataSection;
+/**
+ * Creates a new `Comment` node.
+ *
+ * @param document - owner document
+ * @param data - node contents
+ */
+function create_comment(document, data) {
+ return CommentImpl_1.CommentImpl._create(document, data);
+}
+exports.create_comment = create_comment;
+/**
+ * Creates a new `ProcessingInstruction` node.
+ *
+ * @param document - owner document
+ * @param target - instruction target
+ * @param data - node contents
+ */
+function create_processingInstruction(document, target, data) {
+ return ProcessingInstructionImpl_1.ProcessingInstructionImpl._create(document, target, data);
+}
+exports.create_processingInstruction = create_processingInstruction;
+/**
+ * Creates a new `HTMLCollection`.
+ *
+ * @param root - root node
+ * @param filter - node filter
+ */
+function create_htmlCollection(root, filter) {
+ if (filter === void 0) { filter = (function () { return true; }); }
+ return HTMLCollectionImpl_1.HTMLCollectionImpl._create(root, filter);
+}
+exports.create_htmlCollection = create_htmlCollection;
+/**
+ * Creates a new live `NodeList`.
+ *
+ * @param root - root node
+ */
+function create_nodeList(root) {
+ return NodeListImpl_1.NodeListImpl._create(root);
+}
+exports.create_nodeList = create_nodeList;
+/**
+ * Creates a new static `NodeList`.
+ *
+ * @param root - root node
+ * @param items - a list of items to initialize the list
+ */
+function create_nodeListStatic(root, items) {
+ return NodeListStaticImpl_1.NodeListStaticImpl._create(root, items);
+}
+exports.create_nodeListStatic = create_nodeListStatic;
+/**
+ * Creates a new `NamedNodeMap`.
+ *
+ * @param element - parent element
+ */
+function create_namedNodeMap(element) {
+ return NamedNodeMapImpl_1.NamedNodeMapImpl._create(element);
+}
+exports.create_namedNodeMap = create_namedNodeMap;
+/**
+ * Creates a new `Range`.
+ *
+ * @param start - start point
+ * @param end - end point
+ */
+function create_range(start, end) {
+ return RangeImpl_1.RangeImpl._create(start, end);
+}
+exports.create_range = create_range;
+/**
+ * Creates a new `NodeIterator`.
+ *
+ * @param root - iterator's root node
+ * @param reference - reference node
+ * @param pointerBeforeReference - whether the iterator is before or after the
+ * reference node
+ */
+function create_nodeIterator(root, reference, pointerBeforeReference) {
+ return NodeIteratorImpl_1.NodeIteratorImpl._create(root, reference, pointerBeforeReference);
+}
+exports.create_nodeIterator = create_nodeIterator;
+/**
+ * Creates a new `TreeWalker`.
+ *
+ * @param root - iterator's root node
+ * @param current - current node
+ */
+function create_treeWalker(root, current) {
+ return TreeWalkerImpl_1.TreeWalkerImpl._create(root, current);
+}
+exports.create_treeWalker = create_treeWalker;
+/**
+ * Creates a new `NodeFilter`.
+ */
+function create_nodeFilter() {
+ return NodeFilterImpl_1.NodeFilterImpl._create();
+}
+exports.create_nodeFilter = create_nodeFilter;
+/**
+ * Creates a new `MutationRecord`.
+ *
+ * @param type - type of mutation: `"attributes"` for an attribute
+ * mutation, `"characterData"` for a mutation to a CharacterData node
+ * and `"childList"` for a mutation to the tree of nodes.
+ * @param target - node affected by the mutation.
+ * @param addedNodes - list of added nodes.
+ * @param removedNodes - list of removed nodes.
+ * @param previousSibling - previous sibling of added or removed nodes.
+ * @param nextSibling - next sibling of added or removed nodes.
+ * @param attributeName - local name of the changed attribute,
+ * and `null` otherwise.
+ * @param attributeNamespace - namespace of the changed attribute,
+ * and `null` otherwise.
+ * @param oldValue - value before mutation: attribute value for an attribute
+ * mutation, node `data` for a mutation to a CharacterData node and `null`
+ * for a mutation to the tree of nodes.
+ */
+function create_mutationRecord(type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue) {
+ return MutationRecordImpl_1.MutationRecordImpl._create(type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue);
+}
+exports.create_mutationRecord = create_mutationRecord;
+/**
+ * Creates a new `DOMTokenList`.
+ *
+ * @param element - associated element
+ * @param attribute - associated attribute
+ */
+function create_domTokenList(element, attribute) {
+ return DOMTokenListImpl_1.DOMTokenListImpl._create(element, attribute);
+}
+exports.create_domTokenList = create_domTokenList;
+//# sourceMappingURL=CreateAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js.map
new file mode 100644
index 0000000..621a96a
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"CreateAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/CreateAlgorithm.ts"],"names":[],"mappings":";;AAOA,sEAAoE;AACpE,gDAA8C;AAC9C,0DAAwD;AACxD,oDAAkD;AAClD,kEAAgE;AAChE,0DAAwD;AACxD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mB,CAAC,IAAU,EAAE,SAAe,EAC7D,sBAA+B;IAC/B,OAAO,mCAAgB,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,sBAAsB,CAAC,CAAA;AAC1E,CAAC;AAHD,kDAGC;AAED;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,IAAU,EAAE,OAAa;IACzD,OAAO,+BAAc,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AAC9C,CAAC;AAFD,8CAEC;AAED;;GAEG;AACH,SAAgB,iBAAiB;IAC/B,OAAO,+BAAc,CAAC,OAAO,EAAE,CAAA;AACjC,CAAC;AAFD,8CAEC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,qBAAqB,CAAC,IAAkD,EACtF,MAAY,EAAE,UAAoB,EAClC,YAAsB,EAAE,eAA4B,EACpD,WAAwB,EAAE,aAA4B,EACtD,kBAAiC,EAAE,QAAuB;IAE1D,OAAO,uCAAkB,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EACtE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,EAAE,QAAQ,CAAC,CAAA;AAC9E,CAAC;AARD,sDAQC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,OAAgB,EAClD,SAAe;IACf,OAAO,mCAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;AACrD,CAAC;AAHD,kDAGC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.d.ts
new file mode 100644
index 0000000..b1da77e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.d.ts
@@ -0,0 +1,61 @@
+import { Element, Document, CustomElementDefinition } from "../dom/interfaces";
+/**
+ * Determines if the given string is a valid custom element name.
+ *
+ * @param name - a name string
+ */
+export declare function customElement_isValidCustomElementName(name: string): boolean;
+/**
+ * Determines if the given string is a valid element name.
+ *
+ * @param name - a name string
+ */
+export declare function customElement_isValidElementName(name: string): boolean;
+/**
+ * Determines if the given string is a void element name.
+ *
+ * @param name - a name string
+ */
+export declare function customElement_isVoidElementName(name: string): boolean;
+/**
+ * Determines if the given string is a valid shadow host element name.
+ *
+ * @param name - a name string
+ */
+export declare function customElement_isValidShadowHostName(name: string): boolean;
+/**
+ * Enqueues an upgrade reaction for a custom element.
+ *
+ * @param element - a custom element
+ * @param definition - a custom element definition
+ */
+export declare function customElement_enqueueACustomElementUpgradeReaction(element: Element, definition: CustomElementDefinition): void;
+/**
+ * Enqueues a callback reaction for a custom element.
+ *
+ * @param element - a custom element
+ * @param callbackName - name of the callback
+ * @param args - callback arguments
+ */
+export declare function customElement_enqueueACustomElementCallbackReaction(element: Element, callbackName: string, args: any[]): void;
+/**
+ * Upgrade a custom element.
+ *
+ * @param element - a custom element
+ */
+export declare function customElement_upgrade(definition: CustomElementDefinition, element: Element): void;
+/**
+ * Tries to upgrade a custom element.
+ *
+ * @param element - a custom element
+ */
+export declare function customElement_tryToUpgrade(element: Element): void;
+/**
+ * Looks up a custom element definition.
+ *
+ * @param document - a document
+ * @param namespace - element namespace
+ * @param localName - element local name
+ * @param is - an `is` value
+ */
+export declare function customElement_lookUpACustomElementDefinition(document: Document, namespace: string | null, localName: string | null, is: string | null): CustomElementDefinition | null;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js
new file mode 100644
index 0000000..b9dd3e3
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js
@@ -0,0 +1,108 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var PotentialCustomElementName = /[a-z]([\0-\t\x2D\._a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*-([\0-\t\x2D\._a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*/;
+var NamesWithHyphen = new Set(['annotation-xml', 'color-profile',
+ 'font-face', 'font-face-src', 'font-face-uri', 'font-face-format',
+ 'font-face-name', 'missing-glyph']);
+var ElementNames = new Set(['article', 'aside', 'blockquote',
+ 'body', 'div', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
+ 'header', 'main', 'nav', 'p', 'section', 'span']);
+var VoidElementNames = new Set(['area', 'base', 'basefont',
+ 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen',
+ 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr']);
+var ShadowHostNames = new Set(['article', 'aside', 'blockquote', 'body',
+ 'div', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'main',
+ 'nav', 'p', 'section', 'span']);
+/**
+ * Determines if the given string is a valid custom element name.
+ *
+ * @param name - a name string
+ */
+function customElement_isValidCustomElementName(name) {
+ if (!PotentialCustomElementName.test(name))
+ return false;
+ if (NamesWithHyphen.has(name))
+ return false;
+ return true;
+}
+exports.customElement_isValidCustomElementName = customElement_isValidCustomElementName;
+/**
+ * Determines if the given string is a valid element name.
+ *
+ * @param name - a name string
+ */
+function customElement_isValidElementName(name) {
+ return (ElementNames.has(name));
+}
+exports.customElement_isValidElementName = customElement_isValidElementName;
+/**
+ * Determines if the given string is a void element name.
+ *
+ * @param name - a name string
+ */
+function customElement_isVoidElementName(name) {
+ return (VoidElementNames.has(name));
+}
+exports.customElement_isVoidElementName = customElement_isVoidElementName;
+/**
+ * Determines if the given string is a valid shadow host element name.
+ *
+ * @param name - a name string
+ */
+function customElement_isValidShadowHostName(name) {
+ return (ShadowHostNames.has(name));
+}
+exports.customElement_isValidShadowHostName = customElement_isValidShadowHostName;
+/**
+ * Enqueues an upgrade reaction for a custom element.
+ *
+ * @param element - a custom element
+ * @param definition - a custom element definition
+ */
+function customElement_enqueueACustomElementUpgradeReaction(element, definition) {
+ // TODO: Implement in HTML DOM
+}
+exports.customElement_enqueueACustomElementUpgradeReaction = customElement_enqueueACustomElementUpgradeReaction;
+/**
+ * Enqueues a callback reaction for a custom element.
+ *
+ * @param element - a custom element
+ * @param callbackName - name of the callback
+ * @param args - callback arguments
+ */
+function customElement_enqueueACustomElementCallbackReaction(element, callbackName, args) {
+ // TODO: Implement in HTML DOM
+}
+exports.customElement_enqueueACustomElementCallbackReaction = customElement_enqueueACustomElementCallbackReaction;
+/**
+ * Upgrade a custom element.
+ *
+ * @param element - a custom element
+ */
+function customElement_upgrade(definition, element) {
+ // TODO: Implement in HTML DOM
+}
+exports.customElement_upgrade = customElement_upgrade;
+/**
+ * Tries to upgrade a custom element.
+ *
+ * @param element - a custom element
+ */
+function customElement_tryToUpgrade(element) {
+ // TODO: Implement in HTML DOM
+}
+exports.customElement_tryToUpgrade = customElement_tryToUpgrade;
+/**
+ * Looks up a custom element definition.
+ *
+ * @param document - a document
+ * @param namespace - element namespace
+ * @param localName - element local name
+ * @param is - an `is` value
+ */
+function customElement_lookUpACustomElementDefinition(document, namespace, localName, is) {
+ // TODO: Implement in HTML DOM
+ return null;
+}
+exports.customElement_lookUpACustomElementDefinition = customElement_lookUpACustomElementDefinition;
+//# sourceMappingURL=CustomElementAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js.map
new file mode 100644
index 0000000..a436078
--- /dev/null
+++ b/node_modules/@oozcitak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ules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.d.ts
new file mode 100644
index 0000000..4e25797
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.d.ts
@@ -0,0 +1,72 @@
+import { Node, Element, NodeIterator, Document, Event } from "../dom/interfaces";
+/**
+ * Runs removing steps for node.
+ *
+ * @param removedNode - removed node
+ * @param oldParent - old parent node
+ */
+export declare function dom_runRemovingSteps(removedNode: Node, oldParent: Node): void;
+/**
+ * Runs cloning steps for node.
+ *
+ * @param copy - node clone
+ * @param node - node
+ * @param document - document to own the cloned node
+ * @param cloneChildrenFlag - whether child nodes are cloned
+ */
+export declare function dom_runCloningSteps(copy: Node, node: Node, document: Document, cloneChildrenFlag: boolean): void;
+/**
+ * Runs adopting steps for node.
+ *
+ * @param node - node
+ * @param oldDocument - old document
+ */
+export declare function dom_runAdoptingSteps(node: Node, oldDocument: Document): void;
+/**
+ * Runs attribute change steps for an element node.
+ *
+ * @param element - element node owning the attribute
+ * @param localName - attribute's local name
+ * @param oldValue - attribute's old value
+ * @param value - attribute's new value
+ * @param namespace - attribute's namespace
+ */
+export declare function dom_runAttributeChangeSteps(element: Element, localName: string, oldValue: string | null, value: string | null, namespace: string | null): void;
+/**
+ * Runs insertion steps for a node.
+ *
+ * @param insertedNode - inserted node
+ */
+export declare function dom_runInsertionSteps(insertedNode: Node): void;
+/**
+ * Runs pre-removing steps for a node iterator and node.
+ *
+ * @param nodeIterator - a node iterator
+ * @param toBeRemoved - node to be removed
+ */
+export declare function dom_runNodeIteratorPreRemovingSteps(nodeIterator: NodeIterator, toBeRemoved: Node): void;
+/**
+ * Determines if there are any supported tokens defined for the given
+ * attribute name.
+ *
+ * @param attributeName - an attribute name
+ */
+export declare function dom_hasSupportedTokens(attributeName: string): boolean;
+/**
+ * Returns the set of supported tokens defined for the given attribute name.
+ *
+ * @param attributeName - an attribute name
+ */
+export declare function dom_getSupportedTokens(attributeName: string): Set;
+/**
+ * Runs event construction steps.
+ *
+ * @param event - an event
+ */
+export declare function dom_runEventConstructingSteps(event: Event): void;
+/**
+ * Runs child text content change steps for a parent node.
+ *
+ * @param parent - parent node with text node child nodes
+ */
+export declare function dom_runChildTextContentChangeSteps(parent: Node): void;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js
new file mode 100644
index 0000000..26e4cc7
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js
@@ -0,0 +1,288 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("../dom/DOMImpl");
+var TreeAlgorithm_1 = require("./TreeAlgorithm");
+var util_1 = require("../util");
+var ShadowTreeAlgorithm_1 = require("./ShadowTreeAlgorithm");
+var supportedTokens = new Map();
+/**
+ * Runs removing steps for node.
+ *
+ * @param removedNode - removed node
+ * @param oldParent - old parent node
+ */
+function dom_runRemovingSteps(removedNode, oldParent) {
+ // No steps defined
+}
+exports.dom_runRemovingSteps = dom_runRemovingSteps;
+/**
+ * Runs cloning steps for node.
+ *
+ * @param copy - node clone
+ * @param node - node
+ * @param document - document to own the cloned node
+ * @param cloneChildrenFlag - whether child nodes are cloned
+ */
+function dom_runCloningSteps(copy, node, document, cloneChildrenFlag) {
+ // No steps defined
+}
+exports.dom_runCloningSteps = dom_runCloningSteps;
+/**
+ * Runs adopting steps for node.
+ *
+ * @param node - node
+ * @param oldDocument - old document
+ */
+function dom_runAdoptingSteps(node, oldDocument) {
+ // No steps defined
+}
+exports.dom_runAdoptingSteps = dom_runAdoptingSteps;
+/**
+ * Runs attribute change steps for an element node.
+ *
+ * @param element - element node owning the attribute
+ * @param localName - attribute's local name
+ * @param oldValue - attribute's old value
+ * @param value - attribute's new value
+ * @param namespace - attribute's namespace
+ */
+function dom_runAttributeChangeSteps(element, localName, oldValue, value, namespace) {
+ var e_1, _a;
+ // run default steps
+ if (DOMImpl_1.dom.features.slots) {
+ updateASlotablesName.call(element, element, localName, oldValue, value, namespace);
+ updateASlotsName.call(element, element, localName, oldValue, value, namespace);
+ }
+ updateAnElementID.call(element, element, localName, value, namespace);
+ try {
+ // run custom steps
+ for (var _b = __values(element._attributeChangeSteps), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var step = _c.value;
+ step.call(element, element, localName, oldValue, value, namespace);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+}
+exports.dom_runAttributeChangeSteps = dom_runAttributeChangeSteps;
+/**
+ * Runs insertion steps for a node.
+ *
+ * @param insertedNode - inserted node
+ */
+function dom_runInsertionSteps(insertedNode) {
+ // No steps defined
+}
+exports.dom_runInsertionSteps = dom_runInsertionSteps;
+/**
+ * Runs pre-removing steps for a node iterator and node.
+ *
+ * @param nodeIterator - a node iterator
+ * @param toBeRemoved - node to be removed
+ */
+function dom_runNodeIteratorPreRemovingSteps(nodeIterator, toBeRemoved) {
+ removeNodeIterator.call(nodeIterator, nodeIterator, toBeRemoved);
+}
+exports.dom_runNodeIteratorPreRemovingSteps = dom_runNodeIteratorPreRemovingSteps;
+/**
+ * Determines if there are any supported tokens defined for the given
+ * attribute name.
+ *
+ * @param attributeName - an attribute name
+ */
+function dom_hasSupportedTokens(attributeName) {
+ return supportedTokens.has(attributeName);
+}
+exports.dom_hasSupportedTokens = dom_hasSupportedTokens;
+/**
+ * Returns the set of supported tokens defined for the given attribute name.
+ *
+ * @param attributeName - an attribute name
+ */
+function dom_getSupportedTokens(attributeName) {
+ return supportedTokens.get(attributeName) || new Set();
+}
+exports.dom_getSupportedTokens = dom_getSupportedTokens;
+/**
+ * Runs event construction steps.
+ *
+ * @param event - an event
+ */
+function dom_runEventConstructingSteps(event) {
+ // No steps defined
+}
+exports.dom_runEventConstructingSteps = dom_runEventConstructingSteps;
+/**
+ * Runs child text content change steps for a parent node.
+ *
+ * @param parent - parent node with text node child nodes
+ */
+function dom_runChildTextContentChangeSteps(parent) {
+ // No steps defined
+}
+exports.dom_runChildTextContentChangeSteps = dom_runChildTextContentChangeSteps;
+/**
+ * Defines pre-removing steps for a node iterator.
+ */
+function removeNodeIterator(nodeIterator, toBeRemovedNode) {
+ /**
+ * 1. If toBeRemovedNode is not an inclusive ancestor of nodeIterator’s
+ * reference, or toBeRemovedNode is nodeIterator’s root, then return.
+ */
+ if (toBeRemovedNode === nodeIterator._root ||
+ !TreeAlgorithm_1.tree_isAncestorOf(nodeIterator._reference, toBeRemovedNode, true)) {
+ return;
+ }
+ /**
+ * 2. If nodeIterator’s pointer before reference is true, then:
+ */
+ if (nodeIterator._pointerBeforeReference) {
+ /**
+ * 2.1. Let next be toBeRemovedNode’s first following node that is an
+ * inclusive descendant of nodeIterator’s root and is not an inclusive
+ * descendant of toBeRemovedNode, and null if there is no such node.
+ */
+ while (true) {
+ var nextNode = TreeAlgorithm_1.tree_getFollowingNode(nodeIterator._root, toBeRemovedNode);
+ if (nextNode !== null &&
+ TreeAlgorithm_1.tree_isDescendantOf(nodeIterator._root, nextNode, true) &&
+ !TreeAlgorithm_1.tree_isDescendantOf(toBeRemovedNode, nextNode, true)) {
+ /**
+ * 2.2. If next is non-null, then set nodeIterator’s reference to next
+ * and return.
+ */
+ nodeIterator._reference = nextNode;
+ return;
+ }
+ else if (nextNode === null) {
+ /**
+ * 2.3. Otherwise, set nodeIterator’s pointer before reference to false.
+ */
+ nodeIterator._pointerBeforeReference = false;
+ return;
+ }
+ }
+ }
+ /**
+ * 3. Set nodeIterator’s reference to toBeRemovedNode’s parent, if
+ * toBeRemovedNode’s previous sibling is null, and to the inclusive
+ * descendant of toBeRemovedNode’s previous sibling that appears last in
+ * tree order otherwise.
+ */
+ if (toBeRemovedNode._previousSibling === null) {
+ if (toBeRemovedNode._parent !== null) {
+ nodeIterator._reference = toBeRemovedNode._parent;
+ }
+ }
+ else {
+ var referenceNode = toBeRemovedNode._previousSibling;
+ var childNode = TreeAlgorithm_1.tree_getFirstDescendantNode(toBeRemovedNode._previousSibling, true, false);
+ while (childNode !== null) {
+ if (childNode !== null) {
+ referenceNode = childNode;
+ }
+ // loop through to get the last descendant node
+ childNode = TreeAlgorithm_1.tree_getNextDescendantNode(toBeRemovedNode._previousSibling, childNode, true, false);
+ }
+ nodeIterator._reference = referenceNode;
+ }
+}
+/**
+ * Defines attribute change steps to update a slot’s name.
+ */
+function updateASlotsName(element, localName, oldValue, value, namespace) {
+ /**
+ * 1. If element is a slot, localName is name, and namespace is null, then:
+ * 1.1. If value is oldValue, then return.
+ * 1.2. If value is null and oldValue is the empty string, then return.
+ * 1.3. If value is the empty string and oldValue is null, then return.
+ * 1.4. If value is null or the empty string, then set element’s name to the
+ * empty string.
+ * 1.5. Otherwise, set element’s name to value.
+ * 1.6. Run assign slotables for a tree with element’s root.
+ */
+ if (util_1.Guard.isSlot(element) && localName === "name" && namespace === null) {
+ if (value === oldValue)
+ return;
+ if (value === null && oldValue === '')
+ return;
+ if (value === '' && oldValue === null)
+ return;
+ if ((value === null || value === '')) {
+ element._name = '';
+ }
+ else {
+ element._name = value;
+ }
+ ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(TreeAlgorithm_1.tree_rootNode(element));
+ }
+}
+/**
+ * Defines attribute change steps to update a slotable’s name.
+ */
+function updateASlotablesName(element, localName, oldValue, value, namespace) {
+ /**
+ * 1. If localName is slot and namespace is null, then:
+ * 1.1. If value is oldValue, then return.
+ * 1.2. If value is null and oldValue is the empty string, then return.
+ * 1.3. If value is the empty string and oldValue is null, then return.
+ * 1.4. If value is null or the empty string, then set element’s name to
+ * the empty string.
+ * 1.5. Otherwise, set element’s name to value.
+ * 1.6. If element is assigned, then run assign slotables for element’s
+ * assigned slot.
+ * 1.7. Run assign a slot for element.
+ */
+ if (util_1.Guard.isSlotable(element) && localName === "slot" && namespace === null) {
+ if (value === oldValue)
+ return;
+ if (value === null && oldValue === '')
+ return;
+ if (value === '' && oldValue === null)
+ return;
+ if ((value === null || value === '')) {
+ element._name = '';
+ }
+ else {
+ element._name = value;
+ }
+ if (ShadowTreeAlgorithm_1.shadowTree_isAssigned(element)) {
+ ShadowTreeAlgorithm_1.shadowTree_assignSlotables(element._assignedSlot);
+ }
+ ShadowTreeAlgorithm_1.shadowTree_assignASlot(element);
+ }
+}
+/**
+ * Defines attribute change steps to update an element's ID.
+ */
+function updateAnElementID(element, localName, value, namespace) {
+ /**
+ * 1. If localName is id, namespace is null, and value is null or the empty
+ * string, then unset element’s ID.
+ * 2. Otherwise, if localName is id, namespace is null, then set element’s
+ * ID to value.
+ */
+ if (localName === "id" && namespace === null) {
+ if (!value)
+ element._uniqueIdentifier = undefined;
+ else
+ element._uniqueIdentifier = value;
+ }
+}
+//# sourceMappingURL=DOMAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js.map
new file mode 100644
index 0000000..e211931
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DOMAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/DOMAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,0CAAoC;AAEpC,iDAGwB;AACxB,gCAA+B;AAC/B,6DAG8B;AAE9B,IAAM,eAAe,GAAG,IAAI,GAAG,EAAE,CAAA;AAEjC;;;;;G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b/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.d.ts
new file mode 100644
index 0000000..b5084e9
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.d.ts
@@ -0,0 +1,21 @@
+import { DOMTokenList } from "../dom/interfaces";
+/**
+ * Validates a given token against the supported tokens defined for the given
+ * token lists' associated attribute.
+ *
+ * @param tokenList - a token list
+ * @param token - a token
+ */
+export declare function tokenList_validationSteps(tokenList: DOMTokenList, token: string): boolean;
+/**
+ * Updates the value of the token lists' associated attribute.
+ *
+ * @param tokenList - a token list
+ */
+export declare function tokenList_updateSteps(tokenList: DOMTokenList): void;
+/**
+ * Gets the value of the token lists' associated attribute.
+ *
+ * @param tokenList - a token list
+ */
+export declare function tokenList_serializeSteps(tokenList: DOMTokenList): string;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js
new file mode 100644
index 0000000..a85c786
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js
@@ -0,0 +1,61 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var OrderedSetAlgorithm_1 = require("./OrderedSetAlgorithm");
+var DOMAlgorithm_1 = require("./DOMAlgorithm");
+var ElementAlgorithm_1 = require("./ElementAlgorithm");
+/**
+ * Validates a given token against the supported tokens defined for the given
+ * token lists' associated attribute.
+ *
+ * @param tokenList - a token list
+ * @param token - a token
+ */
+function tokenList_validationSteps(tokenList, token) {
+ /**
+ * 1. If the associated attribute’s local name does not define supported
+ * tokens, throw a TypeError.
+ * 2. Let lowercase token be a copy of token, in ASCII lowercase.
+ * 3. If lowercase token is present in supported tokens, return true.
+ * 4. Return false.
+ */
+ if (!DOMAlgorithm_1.dom_hasSupportedTokens(tokenList._attribute._localName)) {
+ throw new TypeError("There are no supported tokens defined for attribute name: '" + tokenList._attribute._localName + "'.");
+ }
+ return DOMAlgorithm_1.dom_getSupportedTokens(tokenList._attribute._localName).has(token.toLowerCase());
+}
+exports.tokenList_validationSteps = tokenList_validationSteps;
+/**
+ * Updates the value of the token lists' associated attribute.
+ *
+ * @param tokenList - a token list
+ */
+function tokenList_updateSteps(tokenList) {
+ /**
+ * 1. If the associated element does not have an associated attribute and
+ * token set is empty, then return.
+ * 2. Set an attribute value for the associated element using associated
+ * attribute’s local name and the result of running the ordered set
+ * serializer for token set.
+ */
+ if (!tokenList._element.hasAttribute(tokenList._attribute._localName) &&
+ tokenList._tokenSet.size === 0) {
+ return;
+ }
+ ElementAlgorithm_1.element_setAnAttributeValue(tokenList._element, tokenList._attribute._localName, OrderedSetAlgorithm_1.orderedSet_serialize(tokenList._tokenSet));
+}
+exports.tokenList_updateSteps = tokenList_updateSteps;
+/**
+ * Gets the value of the token lists' associated attribute.
+ *
+ * @param tokenList - a token list
+ */
+function tokenList_serializeSteps(tokenList) {
+ /**
+ * A DOMTokenList object’s serialize steps are to return the result of
+ * running get an attribute value given the associated element and the
+ * associated attribute’s local name.
+ */
+ return ElementAlgorithm_1.element_getAnAttributeValue(tokenList._element, tokenList._attribute._localName);
+}
+exports.tokenList_serializeSteps = tokenList_serializeSteps;
+//# sourceMappingURL=DOMTokenListAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js.map
new file mode 100644
index 0000000..0826183
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DOMTokenListAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/DOMTokenListAlgorithm.ts"],"names":[],"mappings":";;AACA,6DAA4D;AAC5D,+CAA+E;AAC/E,uDAE2B;AAE3B;;;;;;GAMG;AACH,SAAgB,yBAAyB,CAAC,SAAuB,EAC/D,KAAa;IACb;;;;;;OAMG;IACH,IAAI,CAAC,qCAAsB,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;QAC5D,MAAM,IAAI,SAAS,CAAC,gEAA8D,SAAS,CAAC,UAAU,CAAC,UAAU,OAAI,CAAC,CAAA;KACvH;IACD,OAAO,qCAAsB,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAA;AACzF,CAAC;AAbD,8DAaC;AAED;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,SAAuB;IAC3D;;;;;;OAMG;IACH,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC;QACnE,SAAS,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,EAAE;QAChC,OAAM;KACP;IACD,8CAA2B,CAAC,SAAS,CAAC,QAAQ,EAC5C,SAAS,CAAC,UAAU,CAAC,UAAU,EAAE,0CAAoB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAA;AAC/E,CAAC;AAdD,sDAcC;AAED;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,SAAuB;IAC9D;;;;OAIG;IACH,OAAO,8CAA2B,CAChC,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;AACxD,CAAC;AARD,4DAQC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.d.ts
new file mode 100644
index 0000000..d459966
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.d.ts
@@ -0,0 +1,29 @@
+import { Element, Document, Node } from "../dom/interfaces";
+/**
+ * Returns an element interface for the given name and namespace.
+ *
+ * @param name - element name
+ * @param namespace - namespace
+ */
+export declare function document_elementInterface(name: string, namespace: string | null): (new (...args: any[]) => Element);
+/**
+ * Creates a new element node.
+ * See: https://dom.spec.whatwg.org/#internal-createelementns-steps
+ *
+ * @param document - owner document
+ * @param namespace - element namespace
+ * @param qualifiedName - qualified name
+ * @param options - element options
+ */
+export declare function document_internalCreateElementNS(document: Document, namespace: string | null, qualifiedName: string, options?: string | {
+ is: string;
+}): Element;
+/**
+ * Removes `node` and its subtree from its document and changes
+ * its owner document to `document` so that it can be inserted
+ * into `document`.
+ *
+ * @param node - the node to move
+ * @param document - document to receive the node and its subtree
+ */
+export declare function document_adopt(node: Node, document: Document): void;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js
new file mode 100644
index 0000000..a3be8cb
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js
@@ -0,0 +1,161 @@
+"use strict";
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("../dom/DOMImpl");
+var util_1 = require("../util");
+var util_2 = require("@oozcitak/util");
+var ElementImpl_1 = require("../dom/ElementImpl");
+var CustomElementAlgorithm_1 = require("./CustomElementAlgorithm");
+var TreeAlgorithm_1 = require("./TreeAlgorithm");
+var NamespaceAlgorithm_1 = require("./NamespaceAlgorithm");
+var DOMAlgorithm_1 = require("./DOMAlgorithm");
+var ElementAlgorithm_1 = require("./ElementAlgorithm");
+var MutationAlgorithm_1 = require("./MutationAlgorithm");
+/**
+ * Returns an element interface for the given name and namespace.
+ *
+ * @param name - element name
+ * @param namespace - namespace
+ */
+function document_elementInterface(name, namespace) {
+ return ElementImpl_1.ElementImpl;
+}
+exports.document_elementInterface = document_elementInterface;
+/**
+ * Creates a new element node.
+ * See: https://dom.spec.whatwg.org/#internal-createelementns-steps
+ *
+ * @param document - owner document
+ * @param namespace - element namespace
+ * @param qualifiedName - qualified name
+ * @param options - element options
+ */
+function document_internalCreateElementNS(document, namespace, qualifiedName, options) {
+ /**
+ * 1. Let namespace, prefix, and localName be the result of passing
+ * namespace and qualifiedName to validate and extract.
+ * 2. Let is be null.
+ * 3. If options is a dictionary and options’s is is present, then set
+ * is to it.
+ * 4. Return the result of creating an element given document, localName,
+ * namespace, prefix, is, and with the synchronous custom elements flag set.
+ */
+ var _a = __read(NamespaceAlgorithm_1.namespace_validateAndExtract(namespace, qualifiedName), 3), ns = _a[0], prefix = _a[1], localName = _a[2];
+ var is = null;
+ if (options !== undefined) {
+ if (util_2.isString(options)) {
+ is = options;
+ }
+ else {
+ is = options.is;
+ }
+ }
+ return ElementAlgorithm_1.element_createAnElement(document, localName, ns, prefix, is, true);
+}
+exports.document_internalCreateElementNS = document_internalCreateElementNS;
+/**
+ * Removes `node` and its subtree from its document and changes
+ * its owner document to `document` so that it can be inserted
+ * into `document`.
+ *
+ * @param node - the node to move
+ * @param document - document to receive the node and its subtree
+ */
+function document_adopt(node, document) {
+ var e_1, _a;
+ // Optimize for common case of inserting a fresh node
+ if (node._nodeDocument === document && node._parent === null) {
+ return;
+ }
+ /**
+ * 1. Let oldDocument be node’s node document.
+ * 2. If node’s parent is not null, remove node from its parent.
+ */
+ var oldDocument = node._nodeDocument;
+ if (node._parent)
+ MutationAlgorithm_1.mutation_remove(node, node._parent);
+ /**
+ * 3. If document is not oldDocument, then:
+ */
+ if (document !== oldDocument) {
+ /**
+ * 3.1. For each inclusiveDescendant in node’s shadow-including inclusive
+ * descendants:
+ */
+ var inclusiveDescendant = TreeAlgorithm_1.tree_getFirstDescendantNode(node, true, true);
+ while (inclusiveDescendant !== null) {
+ /**
+ * 3.1.1. Set inclusiveDescendant’s node document to document.
+ * 3.1.2. If inclusiveDescendant is an element, then set the node
+ * document of each attribute in inclusiveDescendant’s attribute list
+ * to document.
+ */
+ inclusiveDescendant._nodeDocument = document;
+ if (util_1.Guard.isElementNode(inclusiveDescendant)) {
+ try {
+ for (var _b = (e_1 = void 0, __values(inclusiveDescendant._attributeList._asArray())), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var attr = _c.value;
+ attr._nodeDocument = document;
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ }
+ /**
+ * 3.2. For each inclusiveDescendant in node's shadow-including
+ * inclusive descendants that is custom, enqueue a custom
+ * element callback reaction with inclusiveDescendant,
+ * callback name "adoptedCallback", and an argument list
+ * containing oldDocument and document.
+ */
+ if (DOMImpl_1.dom.features.customElements) {
+ if (util_1.Guard.isElementNode(inclusiveDescendant) &&
+ inclusiveDescendant._customElementState === "custom") {
+ CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(inclusiveDescendant, "adoptedCallback", [oldDocument, document]);
+ }
+ }
+ /**
+ * 3.3. For each inclusiveDescendant in node’s shadow-including
+ * inclusive descendants, in shadow-including tree order, run the
+ * adopting steps with inclusiveDescendant and oldDocument.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ DOMAlgorithm_1.dom_runAdoptingSteps(inclusiveDescendant, oldDocument);
+ }
+ inclusiveDescendant = TreeAlgorithm_1.tree_getNextDescendantNode(node, inclusiveDescendant, true, true);
+ }
+ }
+}
+exports.document_adopt = document_adopt;
+//# sourceMappingURL=DocumentAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js.map
new file mode 100644
index 0000000..04c91c3
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DocumentAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/DocumentAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAoC;AAEpC,gCAA+B;AAC/B,uCAAyC;AACzC,kDAAgD;AAChD,mEAA8F;AAC9F,iDAAyF;AACzF,2DAAmE;AACnE,+CAAqD;AACrD,uDAA4D;AAC5D,yDAAqD;AAErD;;;;;GAKG;AACH,SAAgB,yBAAyB,CAAC,IAAY,EAAE,SAAwB;IAE9E,OAAO,yBAAW,CAAA;AACpB,CAAC;AAHD,8DAGC;AAED;;;;;;;;GAQG;AACH,SAAgB,gCAAgC,CAAC,QAAkB,EAAE,SAAwB,EAC3F,aAAqB,EAAE,OAAiC;IACxD;;;;;;;;OAQG;IACG,IAAA,2FACkD,EADjD,UAAE,EAAE,cAAM,EAAE,iBACqC,CAAA;IAExD,IAAI,EAAE,GAAkB,IAAI,CAAA;IAC5B,IAAI,OAAO,KAAK,SAAS,EAAE;QACzB,IAAI,eAAQ,CAAC,OAAO,CAAC,EAAE;YACrB,EAAE,GAAG,OAAO,CAAA;SACb;aAAM;YACL,EAAE,GAAG,OAAO,CAAC,EAAE,CAAA;SAChB;KACF;IAED,OAAO,0CAAuB,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,CAAA;AAC3E,CAAC;AAxBD,4EAwBC;AAED;;;;;;;GA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,0CAA0B,CAAC,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;SACxF;KACF;AACH,CAAC;AAlED,wCAkEC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.d.ts
new file mode 100644
index 0000000..ed5d0da
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.d.ts
@@ -0,0 +1,121 @@
+import { Attr, Element, Document, Node } from "../dom/interfaces";
+/**
+ * Determines whether the element's attribute list contains the given
+ * attribute.
+ *
+ * @param attribute - an attribute node
+ * @param element - an element node
+ */
+export declare function element_has(attribute: Attr, element: Element): boolean;
+/**
+ * Changes the value of an attribute node.
+ *
+ * @param attribute - an attribute node
+ * @param element - an element node
+ * @param value - attribute value
+ */
+export declare function element_change(attribute: Attr, element: Element, value: string): void;
+/**
+ * Appends an attribute to an element node.
+ *
+ * @param attribute - an attribute
+ * @param element - an element to receive the attribute
+ */
+export declare function element_append(attribute: Attr, element: Element): void;
+/**
+ * Removes an attribute from an element node.
+ *
+ * @param attribute - an attribute
+ * @param element - an element to receive the attribute
+ */
+export declare function element_remove(attribute: Attr, element: Element): void;
+/**
+ * Replaces an attribute with another of an element node.
+ *
+ * @param oldAttr - old attribute
+ * @param newAttr - new attribute
+ * @param element - an element to receive the attribute
+ */
+export declare function element_replace(oldAttr: Attr, newAttr: Attr, element: Element): void;
+/**
+ * Retrieves an attribute with the given name from an element node.
+ *
+ * @param qualifiedName - an attribute name
+ * @param element - an element to receive the attribute
+ */
+export declare function element_getAnAttributeByName(qualifiedName: string, element: Element): Attr | null;
+/**
+ * Retrieves an attribute with the given namespace and local name from an
+ * element node.
+ *
+ * @param namespace - an attribute namespace
+ * @param localName - an attribute local name
+ * @param element - an element to receive the attribute
+ */
+export declare function element_getAnAttributeByNamespaceAndLocalName(namespace: string, localName: string, element: Element): Attr | null;
+/**
+ * Retrieves an attribute's value with the given name namespace and local
+ * name from an element node.
+ *
+ * @param element - an element to receive the attribute
+ * @param localName - an attribute local name
+ * @param namespace - an attribute namespace
+ */
+export declare function element_getAnAttributeValue(element: Element, localName: string, namespace?: string): string;
+/**
+ * Sets an attribute of an element node.
+ *
+ * @param attr - an attribute
+ * @param element - an element to receive the attribute
+ */
+export declare function element_setAnAttribute(attr: Attr, element: Element): Attr | null;
+/**
+ * Sets an attribute's value of an element node.
+ *
+ * @param element - an element to receive the attribute
+ * @param localName - an attribute local name
+ * @param value - an attribute value
+ * @param prefix - an attribute prefix
+ * @param namespace - an attribute namespace
+ */
+export declare function element_setAnAttributeValue(element: Element, localName: string, value: string, prefix?: string | null, namespace?: string | null): void;
+/**
+ * Removes an attribute with the given name from an element node.
+ *
+ * @param qualifiedName - an attribute name
+ * @param element - an element to receive the attribute
+ */
+export declare function element_removeAnAttributeByName(qualifiedName: string, element: Element): Attr | null;
+/**
+ * Removes an attribute with the given namespace and local name from an
+ * element node.
+ *
+ * @param namespace - an attribute namespace
+ * @param localName - an attribute local name
+ * @param element - an element to receive the attribute
+ */
+export declare function element_removeAnAttributeByNamespaceAndLocalName(namespace: string, localName: string, element: Element): Attr | null;
+/**
+ * Creates an element node.
+ * See: https://dom.spec.whatwg.org/#concept-create-element.
+ *
+ * @param document - the document owning the element
+ * @param localName - local name
+ * @param namespace - element namespace
+ * @param prefix - namespace prefix
+ * @param is - the "is" value
+ * @param synchronousCustomElementsFlag - synchronous custom elements flag
+ */
+export declare function element_createAnElement(document: Document, localName: string, namespace: string | null, prefix?: string | null, is?: string | null, synchronousCustomElementsFlag?: boolean): Element;
+/**
+ * Inserts a new node adjacent to this element.
+ *
+ * @param element - a reference element
+ * @param where - a string defining where to insert the element node.
+ * - `beforebegin` before this element itself.
+ * - `afterbegin` before the first child.
+ * - `beforeend` after the last child.
+ * - `afterend` after this element itself.
+ * @param node - node to insert
+ */
+export declare function element_insertAdjacent(element: Element, where: "beforebegin" | "afterbegin" | "beforeend" | "afterend", node: Node): Node | null;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js
new file mode 100644
index 0000000..97385b4
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js
@@ -0,0 +1,608 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("../dom/DOMImpl");
+var infra_1 = require("@oozcitak/infra");
+var util_1 = require("../util");
+var DOMException_1 = require("../dom/DOMException");
+var CreateAlgorithm_1 = require("./CreateAlgorithm");
+var CustomElementAlgorithm_1 = require("./CustomElementAlgorithm");
+var MutationObserverAlgorithm_1 = require("./MutationObserverAlgorithm");
+var DOMAlgorithm_1 = require("./DOMAlgorithm");
+var MutationAlgorithm_1 = require("./MutationAlgorithm");
+var DocumentAlgorithm_1 = require("./DocumentAlgorithm");
+/**
+ * Determines whether the element's attribute list contains the given
+ * attribute.
+ *
+ * @param attribute - an attribute node
+ * @param element - an element node
+ */
+function element_has(attribute, element) {
+ /**
+ * An element has an attribute A if its attribute list contains A.
+ */
+ return element._attributeList._asArray().indexOf(attribute) !== -1;
+}
+exports.element_has = element_has;
+/**
+ * Changes the value of an attribute node.
+ *
+ * @param attribute - an attribute node
+ * @param element - an element node
+ * @param value - attribute value
+ */
+function element_change(attribute, element, value) {
+ /**
+ * 1. Queue an attribute mutation record for element with attribute’s
+ * local name, attribute’s namespace, and attribute’s value.
+ */
+ if (DOMImpl_1.dom.features.mutationObservers) {
+ MutationObserverAlgorithm_1.observer_queueAttributeMutationRecord(element, attribute._localName, attribute._namespace, attribute._value);
+ }
+ /**
+ * 2. If element is custom, then enqueue a custom element callback reaction
+ * with element, callback name "attributeChangedCallback", and an argument
+ * list containing attribute’s local name, attribute’s value, value, and
+ * attribute’s namespace.
+ */
+ if (DOMImpl_1.dom.features.customElements) {
+ if (util_1.Guard.isCustomElementNode(element)) {
+ CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(element, "attributeChangedCallback", [attribute._localName, attribute._value, value, attribute._namespace]);
+ }
+ }
+ /**
+ * 3. Run the attribute change steps with element, attribute’s local name,
+ * attribute’s value, value, and attribute’s namespace.
+ * 4. Set attribute’s value to value.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ DOMAlgorithm_1.dom_runAttributeChangeSteps(element, attribute._localName, attribute._value, value, attribute._namespace);
+ }
+ attribute._value = value;
+}
+exports.element_change = element_change;
+/**
+ * Appends an attribute to an element node.
+ *
+ * @param attribute - an attribute
+ * @param element - an element to receive the attribute
+ */
+function element_append(attribute, element) {
+ /**
+ * 1. Queue an attribute mutation record for element with attribute’s
+ * local name, attribute’s namespace, and null.
+ */
+ if (DOMImpl_1.dom.features.mutationObservers) {
+ MutationObserverAlgorithm_1.observer_queueAttributeMutationRecord(element, attribute._localName, attribute._namespace, null);
+ }
+ /**
+ * 2. If element is custom, then enqueue a custom element callback reaction
+ * with element, callback name "attributeChangedCallback", and an argument
+ * list containing attribute’s local name, null, attribute’s value, and
+ * attribute’s namespace.
+ */
+ if (DOMImpl_1.dom.features.customElements) {
+ if (util_1.Guard.isCustomElementNode(element)) {
+ CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(element, "attributeChangedCallback", [attribute._localName, null, attribute._value, attribute._namespace]);
+ }
+ }
+ /**
+ * 3. Run the attribute change steps with element, attribute’s local name,
+ * null, attribute’s value, and attribute’s namespace.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ DOMAlgorithm_1.dom_runAttributeChangeSteps(element, attribute._localName, null, attribute._value, attribute._namespace);
+ }
+ /**
+ * 4. Append attribute to element’s attribute list.
+ * 5. Set attribute’s element to element.
+ */
+ element._attributeList._asArray().push(attribute);
+ attribute._element = element;
+ // mark that the document has namespaces
+ if (!element._nodeDocument._hasNamespaces && (attribute._namespace !== null ||
+ attribute._namespacePrefix !== null || attribute._localName === "xmlns")) {
+ element._nodeDocument._hasNamespaces = true;
+ }
+}
+exports.element_append = element_append;
+/**
+ * Removes an attribute from an element node.
+ *
+ * @param attribute - an attribute
+ * @param element - an element to receive the attribute
+ */
+function element_remove(attribute, element) {
+ /**
+ * 1. Queue an attribute mutation record for element with attribute’s
+ * local name, attribute’s namespace, and attribute’s value.
+ */
+ if (DOMImpl_1.dom.features.mutationObservers) {
+ MutationObserverAlgorithm_1.observer_queueAttributeMutationRecord(element, attribute._localName, attribute._namespace, attribute._value);
+ }
+ /**
+ * 2. If element is custom, then enqueue a custom element callback reaction
+ * with element, callback name "attributeChangedCallback", and an argument
+ * list containing attribute’s local name, attribute’s value, null,
+ * and attribute’s namespace.
+ */
+ if (DOMImpl_1.dom.features.customElements) {
+ if (util_1.Guard.isCustomElementNode(element)) {
+ CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(element, "attributeChangedCallback", [attribute._localName, attribute._value, null, attribute._namespace]);
+ }
+ }
+ /**
+ * 3. Run the attribute change steps with element, attribute’s local name,
+ * attribute’s value, null, and attribute’s namespace.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ DOMAlgorithm_1.dom_runAttributeChangeSteps(element, attribute._localName, attribute._value, null, attribute._namespace);
+ }
+ /**
+ * 3. Remove attribute from element’s attribute list.
+ * 5. Set attribute’s element to null.
+ */
+ var index = element._attributeList._asArray().indexOf(attribute);
+ element._attributeList._asArray().splice(index, 1);
+ attribute._element = null;
+}
+exports.element_remove = element_remove;
+/**
+ * Replaces an attribute with another of an element node.
+ *
+ * @param oldAttr - old attribute
+ * @param newAttr - new attribute
+ * @param element - an element to receive the attribute
+ */
+function element_replace(oldAttr, newAttr, element) {
+ /**
+ * 1. Queue an attribute mutation record for element with oldAttr’s
+ * local name, oldAttr’s namespace, and oldAttr’s value.
+ */
+ if (DOMImpl_1.dom.features.mutationObservers) {
+ MutationObserverAlgorithm_1.observer_queueAttributeMutationRecord(element, oldAttr._localName, oldAttr._namespace, oldAttr._value);
+ }
+ /**
+ * 2. If element is custom, then enqueue a custom element callback reaction
+ * with element, callback name "attributeChangedCallback", and an argument
+ * list containing oldAttr’s local name, oldAttr’s value, newAttr’s value,
+ * and oldAttr’s namespace.
+ */
+ if (DOMImpl_1.dom.features.customElements) {
+ if (util_1.Guard.isCustomElementNode(element)) {
+ CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(element, "attributeChangedCallback", [oldAttr._localName, oldAttr._value, newAttr._value, oldAttr._namespace]);
+ }
+ }
+ /**
+ * 3. Run the attribute change steps with element, oldAttr’s local name,
+ * oldAttr’s value, newAttr’s value, and oldAttr’s namespace.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ DOMAlgorithm_1.dom_runAttributeChangeSteps(element, oldAttr._localName, oldAttr._value, newAttr._value, oldAttr._namespace);
+ }
+ /**
+ * 4. Replace oldAttr by newAttr in element’s attribute list.
+ * 5. Set oldAttr’s element to null.
+ * 6. Set newAttr’s element to element.
+ */
+ var index = element._attributeList._asArray().indexOf(oldAttr);
+ if (index !== -1) {
+ element._attributeList._asArray()[index] = newAttr;
+ }
+ oldAttr._element = null;
+ newAttr._element = element;
+ // mark that the document has namespaces
+ if (!element._nodeDocument._hasNamespaces && (newAttr._namespace !== null ||
+ newAttr._namespacePrefix !== null || newAttr._localName === "xmlns")) {
+ element._nodeDocument._hasNamespaces = true;
+ }
+}
+exports.element_replace = element_replace;
+/**
+ * Retrieves an attribute with the given name from an element node.
+ *
+ * @param qualifiedName - an attribute name
+ * @param element - an element to receive the attribute
+ */
+function element_getAnAttributeByName(qualifiedName, element) {
+ /**
+ * 1. If element is in the HTML namespace and its node document is an HTML
+ * document, then set qualifiedName to qualifiedName in ASCII lowercase.
+ * 2. Return the first attribute in element’s attribute list whose qualified
+ * name is qualifiedName, and null otherwise.
+ */
+ if (element._namespace === infra_1.namespace.HTML && element._nodeDocument._type === "html") {
+ qualifiedName = qualifiedName.toLowerCase();
+ }
+ return element._attributeList._asArray().find(function (attr) { return attr._qualifiedName === qualifiedName; }) || null;
+}
+exports.element_getAnAttributeByName = element_getAnAttributeByName;
+/**
+ * Retrieves an attribute with the given namespace and local name from an
+ * element node.
+ *
+ * @param namespace - an attribute namespace
+ * @param localName - an attribute local name
+ * @param element - an element to receive the attribute
+ */
+function element_getAnAttributeByNamespaceAndLocalName(namespace, localName, element) {
+ /**
+ * 1. If namespace is the empty string, set it to null.
+ * 2. Return the attribute in element’s attribute list whose namespace is
+ * namespace and local name is localName, if any, and null otherwise.
+ */
+ var ns = namespace || null;
+ return element._attributeList._asArray().find(function (attr) { return attr._namespace === ns && attr._localName === localName; }) || null;
+}
+exports.element_getAnAttributeByNamespaceAndLocalName = element_getAnAttributeByNamespaceAndLocalName;
+/**
+ * Retrieves an attribute's value with the given name namespace and local
+ * name from an element node.
+ *
+ * @param element - an element to receive the attribute
+ * @param localName - an attribute local name
+ * @param namespace - an attribute namespace
+ */
+function element_getAnAttributeValue(element, localName, namespace) {
+ if (namespace === void 0) { namespace = ''; }
+ /**
+ * 1. Let attr be the result of getting an attribute given namespace,
+ * localName, and element.
+ * 2. If attr is null, then return the empty string.
+ * 3. Return attr’s value.
+ */
+ var attr = element_getAnAttributeByNamespaceAndLocalName(namespace, localName, element);
+ if (attr === null)
+ return '';
+ else
+ return attr._value;
+}
+exports.element_getAnAttributeValue = element_getAnAttributeValue;
+/**
+ * Sets an attribute of an element node.
+ *
+ * @param attr - an attribute
+ * @param element - an element to receive the attribute
+ */
+function element_setAnAttribute(attr, element) {
+ /**
+ * 1. If attr’s element is neither null nor element, throw an
+ * "InUseAttributeError" DOMException.
+ * 2. Let oldAttr be the result of getting an attribute given attr’s
+ * namespace, attr’s local name, and element.
+ * 3. If oldAttr is attr, return attr.
+ * 4. If oldAttr is non-null, replace it by attr in element.
+ * 5. Otherwise, append attr to element.
+ * 6. Return oldAttr.
+ */
+ if (attr._element !== null && attr._element !== element)
+ throw new DOMException_1.InUseAttributeError("This attribute already exists in the document: " + attr._qualifiedName + " as a child of " + attr._element._qualifiedName + ".");
+ var oldAttr = element_getAnAttributeByNamespaceAndLocalName(attr._namespace || '', attr._localName, element);
+ if (oldAttr === attr)
+ return attr;
+ if (oldAttr !== null) {
+ element_replace(oldAttr, attr, element);
+ }
+ else {
+ element_append(attr, element);
+ }
+ return oldAttr;
+}
+exports.element_setAnAttribute = element_setAnAttribute;
+/**
+ * Sets an attribute's value of an element node.
+ *
+ * @param element - an element to receive the attribute
+ * @param localName - an attribute local name
+ * @param value - an attribute value
+ * @param prefix - an attribute prefix
+ * @param namespace - an attribute namespace
+ */
+function element_setAnAttributeValue(element, localName, value, prefix, namespace) {
+ if (prefix === void 0) { prefix = null; }
+ if (namespace === void 0) { namespace = null; }
+ /**
+ * 1. If prefix is not given, set it to null.
+ * 2. If namespace is not given, set it to null.
+ * 3. Let attribute be the result of getting an attribute given namespace,
+ * localName, and element.
+ * 4. If attribute is null, create an attribute whose namespace is
+ * namespace, namespace prefix is prefix, local name is localName, value
+ * is value, and node document is element’s node document, then append this
+ * attribute to element, and then return.
+ * 5. Change attribute from element to value.
+ */
+ var attribute = element_getAnAttributeByNamespaceAndLocalName(namespace || '', localName, element);
+ if (attribute === null) {
+ var newAttr = CreateAlgorithm_1.create_attr(element._nodeDocument, localName);
+ newAttr._namespace = namespace;
+ newAttr._namespacePrefix = prefix;
+ newAttr._value = value;
+ element_append(newAttr, element);
+ return;
+ }
+ element_change(attribute, element, value);
+}
+exports.element_setAnAttributeValue = element_setAnAttributeValue;
+/**
+ * Removes an attribute with the given name from an element node.
+ *
+ * @param qualifiedName - an attribute name
+ * @param element - an element to receive the attribute
+ */
+function element_removeAnAttributeByName(qualifiedName, element) {
+ /**
+ * 1. Let attr be the result of getting an attribute given qualifiedName
+ * and element.
+ * 2. If attr is non-null, remove it from element.
+ * 3. Return attr.
+ */
+ var attr = element_getAnAttributeByName(qualifiedName, element);
+ if (attr !== null) {
+ element_remove(attr, element);
+ }
+ return attr;
+}
+exports.element_removeAnAttributeByName = element_removeAnAttributeByName;
+/**
+ * Removes an attribute with the given namespace and local name from an
+ * element node.
+ *
+ * @param namespace - an attribute namespace
+ * @param localName - an attribute local name
+ * @param element - an element to receive the attribute
+ */
+function element_removeAnAttributeByNamespaceAndLocalName(namespace, localName, element) {
+ /**
+ * 1. Let attr be the result of getting an attribute given namespace, localName, and element.
+ * 2. If attr is non-null, remove it from element.
+ * 3. Return attr.
+ */
+ var attr = element_getAnAttributeByNamespaceAndLocalName(namespace, localName, element);
+ if (attr !== null) {
+ element_remove(attr, element);
+ }
+ return attr;
+}
+exports.element_removeAnAttributeByNamespaceAndLocalName = element_removeAnAttributeByNamespaceAndLocalName;
+/**
+ * Creates an element node.
+ * See: https://dom.spec.whatwg.org/#concept-create-element.
+ *
+ * @param document - the document owning the element
+ * @param localName - local name
+ * @param namespace - element namespace
+ * @param prefix - namespace prefix
+ * @param is - the "is" value
+ * @param synchronousCustomElementsFlag - synchronous custom elements flag
+ */
+function element_createAnElement(document, localName, namespace, prefix, is, synchronousCustomElementsFlag) {
+ if (prefix === void 0) { prefix = null; }
+ if (is === void 0) { is = null; }
+ if (synchronousCustomElementsFlag === void 0) { synchronousCustomElementsFlag = false; }
+ /**
+ * 1. If prefix was not given, let prefix be null.
+ * 2. If is was not given, let is be null.
+ * 3. Let result be null.
+ */
+ var result = null;
+ if (!DOMImpl_1.dom.features.customElements) {
+ result = CreateAlgorithm_1.create_element(document, localName, namespace, prefix);
+ result._customElementState = "uncustomized";
+ result._customElementDefinition = null;
+ result._is = is;
+ return result;
+ }
+ /**
+ * 4. Let definition be the result of looking up a custom element definition
+ * given document, namespace, localName, and is.
+ */
+ var definition = CustomElementAlgorithm_1.customElement_lookUpACustomElementDefinition(document, namespace, localName, is);
+ if (definition !== null && definition.name !== definition.localName) {
+ /**
+ * 5. If definition is non-null, and definition’s name is not equal to
+ * its local name (i.e., definition represents a customized built-in
+ * element), then:
+ * 5.1. Let interface be the element interface for localName and the HTML
+ * namespace.
+ * 5.2. Set result to a new element that implements interface, with no
+ * attributes, namespace set to the HTML namespace, namespace prefix
+ * set to prefix, local name set to localName, custom element state set
+ * to "undefined", custom element definition set to null, is value set
+ * to is, and node document set to document.
+ * 5.3. If the synchronous custom elements flag is set, upgrade element
+ * using definition.
+ * 5.4. Otherwise, enqueue a custom element upgrade reaction given result
+ * and definition.
+ */
+ var elemenInterface = DocumentAlgorithm_1.document_elementInterface(localName, infra_1.namespace.HTML);
+ result = new elemenInterface();
+ result._localName = localName;
+ result._namespace = infra_1.namespace.HTML;
+ result._namespacePrefix = prefix;
+ result._customElementState = "undefined";
+ result._customElementDefinition = null;
+ result._is = is;
+ result._nodeDocument = document;
+ if (synchronousCustomElementsFlag) {
+ CustomElementAlgorithm_1.customElement_upgrade(definition, result);
+ }
+ else {
+ CustomElementAlgorithm_1.customElement_enqueueACustomElementUpgradeReaction(result, definition);
+ }
+ }
+ else if (definition !== null) {
+ /**
+ * 6. Otherwise, if definition is non-null, then:
+ */
+ if (synchronousCustomElementsFlag) {
+ /**
+ * 6.1. If the synchronous custom elements flag is set, then run these
+ * steps while catching any exceptions:
+ */
+ try {
+ /**
+ * 6.1.1. Let C be definition’s constructor.
+ * 6.1.2. Set result to the result of constructing C, with no arguments.
+ * 6.1.3. Assert: result’s custom element state and custom element definition
+ * are initialized.
+ * 6.1.4. Assert: result’s namespace is the HTML namespace.
+ * _Note:_ IDL enforces that result is an HTMLElement object, which all
+ * use the HTML namespace.
+ */
+ var C = definition.constructor;
+ var result_1 = new C();
+ console.assert(result_1._customElementState !== undefined);
+ console.assert(result_1._customElementDefinition !== undefined);
+ console.assert(result_1._namespace === infra_1.namespace.HTML);
+ /**
+ * 6.1.5. If result’s attribute list is not empty, then throw a
+ * "NotSupportedError" DOMException.
+ * 6.1.6. If result has children, then throw a "NotSupportedError"
+ * DOMException.
+ * 6.1.7. If result’s parent is not null, then throw a
+ * "NotSupportedError" DOMException.
+ * 6.1.8. If result’s node document is not document, then throw a
+ * "NotSupportedError" DOMException.
+ * 6.1.9. If result’s local name is not equal to localName, then throw
+ * a "NotSupportedError" DOMException.
+ */
+ if (result_1._attributeList.length !== 0)
+ throw new DOMException_1.NotSupportedError("Custom element already has attributes.");
+ if (result_1._children.size !== 0)
+ throw new DOMException_1.NotSupportedError("Custom element already has child nodes.");
+ if (result_1._parent !== null)
+ throw new DOMException_1.NotSupportedError("Custom element already has a parent node.");
+ if (result_1._nodeDocument !== document)
+ throw new DOMException_1.NotSupportedError("Custom element is already in a document.");
+ if (result_1._localName !== localName)
+ throw new DOMException_1.NotSupportedError("Custom element has a different local name.");
+ /**
+ * 6.1.10. Set result’s namespace prefix to prefix.
+ * 6.1.11. Set result’s is value to null.
+ */
+ result_1._namespacePrefix = prefix;
+ result_1._is = null;
+ }
+ catch (e) {
+ /**
+ * If any of these steps threw an exception, then:
+ * - Report the exception.
+ * - Set result to a new element that implements the HTMLUnknownElement
+ * interface, with no attributes, namespace set to the HTML namespace,
+ * namespace prefix set to prefix, local name set to localName, custom
+ * element state set to "failed", custom element definition set to null,
+ * is value set to null, and node document set to document.
+ */
+ // TODO: Report the exception
+ result = CreateAlgorithm_1.create_htmlUnknownElement(document, localName, infra_1.namespace.HTML, prefix);
+ result._customElementState = "failed";
+ result._customElementDefinition = null;
+ result._is = null;
+ }
+ }
+ else {
+ /**
+ * 6.2. Otherwise:
+ * 6.2.1. Set result to a new element that implements the HTMLElement
+ * interface, with no attributes, namespace set to the HTML namespace,
+ * namespace prefix set to prefix, local name set to localName, custom
+ * element state set to "undefined", custom element definition set to
+ * null, is value set to null, and node document set to document.
+ * 6.2.2. Enqueue a custom element upgrade reaction given result and
+ * definition.
+ */
+ result = CreateAlgorithm_1.create_htmlElement(document, localName, infra_1.namespace.HTML, prefix);
+ result._customElementState = "undefined";
+ result._customElementDefinition = null;
+ result._is = null;
+ CustomElementAlgorithm_1.customElement_enqueueACustomElementUpgradeReaction(result, definition);
+ }
+ }
+ else {
+ /**
+ * 7. Otherwise:
+ * 7.1. Let interface be the element interface for localName and
+ * namespace.
+ * 7.2. Set result to a new element that implements interface, with no
+ * attributes, namespace set to namespace, namespace prefix set to prefix,
+ * local name set to localName, custom element state set to
+ * "uncustomized", custom element definition set to null, is value set to
+ * is, and node document set to document.
+ */
+ var elementInterface = DocumentAlgorithm_1.document_elementInterface(localName, namespace);
+ result = new elementInterface();
+ result._localName = localName;
+ result._namespace = namespace;
+ result._namespacePrefix = prefix;
+ result._customElementState = "uncustomized";
+ result._customElementDefinition = null;
+ result._is = is;
+ result._nodeDocument = document;
+ /**
+ * 7.3. If namespace is the HTML namespace, and either localName is a
+ * valid custom element name or is is non-null, then set result’s
+ * custom element state to "undefined".
+ */
+ if (namespace === infra_1.namespace.HTML && (is !== null ||
+ CustomElementAlgorithm_1.customElement_isValidCustomElementName(localName))) {
+ result._customElementState = "undefined";
+ }
+ }
+ /* istanbul ignore next */
+ if (result === null) {
+ throw new Error("Unable to create element.");
+ }
+ /**
+ * 8. Returns result
+ */
+ return result;
+}
+exports.element_createAnElement = element_createAnElement;
+/**
+ * Inserts a new node adjacent to this element.
+ *
+ * @param element - a reference element
+ * @param where - a string defining where to insert the element node.
+ * - `beforebegin` before this element itself.
+ * - `afterbegin` before the first child.
+ * - `beforeend` after the last child.
+ * - `afterend` after this element itself.
+ * @param node - node to insert
+ */
+function element_insertAdjacent(element, where, node) {
+ /**
+ * - "beforebegin"
+ * If element’s parent is null, return null.
+ * Return the result of pre-inserting node into element’s parent before
+ * element.
+ * - "afterbegin"
+ * Return the result of pre-inserting node into element before element’s
+ * first child.
+ * - "beforeend"
+ * Return the result of pre-inserting node into element before null.
+ * - "afterend"
+ * If element’s parent is null, return null.
+ * Return the result of pre-inserting node into element’s parent before element’s next sibling.
+ * - Otherwise
+ * Throw a "SyntaxError" DOMException.
+ */
+ switch (where.toLowerCase()) {
+ case 'beforebegin':
+ if (element._parent === null)
+ return null;
+ return MutationAlgorithm_1.mutation_preInsert(node, element._parent, element);
+ case 'afterbegin':
+ return MutationAlgorithm_1.mutation_preInsert(node, element, element._firstChild);
+ case 'beforeend':
+ return MutationAlgorithm_1.mutation_preInsert(node, element, null);
+ case 'afterend':
+ if (element._parent === null)
+ return null;
+ return MutationAlgorithm_1.mutation_preInsert(node, element._parent, element._nextSibling);
+ default:
+ throw new DOMException_1.SyntaxError("Invalid 'where' argument. \"beforebegin\", \"afterbegin\", \"beforeend\" or \"afterend\" expected");
+ }
+}
+exports.element_insertAdjacent = element_insertAdjacent;
+//# sourceMappingURL=ElementAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js.map
new file mode 100644
index 0000000..5a154ce
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ElementAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/ElementAlgorithm.ts"],"names":[],"mappings":";;AAAA,0CAAoC;AAEpC,yCAA6D;AAC7D,gCAA+B;AAC/B,oDAAyF;AACzF,qDAE0B;AAC1B,mEAKiC;AACjC,yEAAmF;AACnF,+CAA4D;AAC5D,yDAAwD;AACxD,yDAA+D;AAE/D;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,SAAe,EAAE,OAAgB;IAC3D;;OAEG;IACH,OAAO,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAA;AACpE,CAAC;AALD,kCAKC;AAED;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,SAAe,EAAE,OAAgB,EAAE,KAAa;IAC7E;;;OAGG;IACH,IAAI,aAAG,CAAC,QAAQ,CAAC,iBAAiB,EAAE;QAClC,iEAAqC,CAAC,OAAO,EAC3C,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;KAChE;IAED;;;;;OAKG;IACH,IAAI,aAAG,CAAC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W,EAAE,EAAE;QAC3B,KAAK,aAAa;YAChB,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI;gBAAE,OAAO,IAAI,CAAA;YACzC,OAAO,sCAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAC7C,OAAO,CAAC,CAAA;QACZ,KAAK,YAAY;YACf,OAAO,sCAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;QAC/D,KAAK,WAAW;YACd,OAAO,sCAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;QAChD,KAAK,UAAU;YACb,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI;gBAAE,OAAO,IAAI,CAAA;YACzC,OAAO,sCAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAC7C,OAAO,CAAC,YAAY,CAAC,CAAA;QACzB;YACE,MAAM,IAAI,0BAAW,CAAC,mGAA2F,CAAC,CAAA;KACrH;AACH,CAAC;AAnCD,wDAmCC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.d.ts
new file mode 100644
index 0000000..895a840
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.d.ts
@@ -0,0 +1,146 @@
+import { PotentialEventTarget, EventPathItem, EventListenerEntry, EventHandler, Event, EventTarget } from "../dom/interfaces";
+import { EventImpl } from "../dom/EventImpl";
+/**
+ * Defines a boolean out variable of a function.
+ */
+export declare type OutputFlag = {
+ value: boolean;
+};
+/**
+ * Sets the canceled flag of an event.
+ *
+ * @param event - an event
+ */
+export declare function event_setTheCanceledFlag(event: Event): void;
+/**
+ * Initializes the value of an event.
+ *
+ * @param event - an event to initialize
+ * @param type - the type of event
+ * @param bubbles - whether the event propagates in reverse
+ * @param cancelable - whether the event can be cancelled
+ */
+export declare function event_initialize(event: Event, type: string, bubbles: boolean, cancelable: boolean): void;
+/**
+ * Creates a new event.
+ *
+ * @param eventInterface - event interface
+ * @param realm - realm
+ */
+export declare function event_createAnEvent(eventInterface: typeof EventImpl, realm?: any | undefined): Event;
+/**
+ * Performs event creation steps.
+ *
+ * @param eventInterface - event interface
+ * @param realm - realm
+ * @param time - time of occurrance
+ * @param dictionary - event attributes
+ *
+ */
+export declare function event_innerEventCreationSteps(eventInterface: typeof EventImpl, realm: any, time: Date, dictionary: {
+ [key: string]: any;
+}): Event;
+/**
+ * Dispatches an event to an event target.
+ *
+ * @param event - the event to dispatch
+ * @param target - event target
+ * @param legacyTargetOverrideFlag - legacy target override flag
+ * @param legacyOutputDidListenersThrowFlag - legacy output flag that returns
+ * whether the event listener's callback threw an exception
+ */
+export declare function event_dispatch(event: Event, target: EventTarget, legacyTargetOverrideFlag?: boolean, legacyOutputDidListenersThrowFlag?: OutputFlag): boolean;
+/**
+ * Appends a new struct to an event's path.
+ *
+ * @param event - an event
+ * @param invocationTarget - the target of the invocation
+ * @param shadowAdjustedTarget - shadow-root adjusted event target
+ * @param relatedTarget - related event target
+ * @param touchTargets - a list of touch targets
+ * @param slotInClosedTree - if the target's parent is a closed shadow root
+ */
+export declare function event_appendToAnEventPath(event: Event, invocationTarget: EventTarget, shadowAdjustedTarget: PotentialEventTarget, relatedTarget: PotentialEventTarget, touchTargets: PotentialEventTarget[], slotInClosedTree: boolean): void;
+/**
+ * Invokes an event.
+ *
+ * @param struct - a struct defining event's path
+ * @param event - the event to invoke
+ * @param phase - event phase
+ * @param legacyOutputDidListenersThrowFlag - legacy output flag that returns
+ * whether the event listener's callback threw an exception
+ */
+export declare function event_invoke(struct: EventPathItem, event: Event, phase: "capturing" | "bubbling", legacyOutputDidListenersThrowFlag?: OutputFlag): void;
+/**
+ * Invokes an event.
+ *
+ * @param event - the event to invoke
+ * @param listeners - event listeners
+ * @param phase - event phase
+ * @param struct - a struct defining event's path
+ * @param legacyOutputDidListenersThrowFlag - legacy output flag that returns
+ * whether the event listener's callback threw an exception
+ */
+export declare function event_innerInvoke(event: Event, listeners: EventListenerEntry[], phase: "capturing" | "bubbling", struct: EventPathItem, legacyOutputDidListenersThrowFlag?: OutputFlag): boolean;
+/**
+ * Fires an event at target.
+ * @param e - event name
+ * @param target - event target
+ * @param eventConstructor - an event constructor, with a description of how
+ * IDL attributes are to be initialized
+ * @param idlAttributes - a dictionary describing how IDL attributes are
+ * to be initialized
+ * @param legacyTargetOverrideFlag - legacy target override flag
+ */
+export declare function event_fireAnEvent(e: string, target: EventTarget, eventConstructor?: typeof EventImpl, idlAttributes?: {
+ [key: string]: any;
+}, legacyTargetOverrideFlag?: boolean): boolean;
+/**
+ * Creates an event.
+ *
+ * @param eventInterface - the name of the event interface
+ */
+export declare function event_createLegacyEvent(eventInterface: string): Event;
+/**
+ * Getter of an event handler IDL attribute.
+ *
+ * @param eventTarget - event target
+ * @param name - event name
+ */
+export declare function event_getterEventHandlerIDLAttribute(thisObj: EventTarget, name: string): EventHandler;
+/**
+ * Setter of an event handler IDL attribute.
+ *
+ * @param eventTarget - event target
+ * @param name - event name
+ * @param value - event handler
+ */
+export declare function event_setterEventHandlerIDLAttribute(thisObj: EventTarget, name: string, value: EventHandler): void;
+/**
+ * Determines the target of an event handler.
+ *
+ * @param eventTarget - event target
+ * @param name - event name
+ */
+export declare function event_determineTheTargetOfAnEventHandler(eventTarget: EventTarget, name: string): EventTarget | null;
+/**
+ * Gets the current value of an event handler.
+ *
+ * @param eventTarget - event target
+ * @param name - event name
+ */
+export declare function event_getTheCurrentValueOfAnEventHandler(eventTarget: EventTarget, name: string): EventHandler;
+/**
+ * Activates an event handler.
+ *
+ * @param eventTarget - event target
+ * @param name - event name
+ */
+export declare function event_activateAnEventHandler(eventTarget: EventTarget, name: string): void;
+/**
+ * Deactivates an event handler.
+ *
+ * @param eventTarget - event target
+ * @param name - event name
+ */
+export declare function event_deactivateAnEventHandler(eventTarget: EventTarget, name: string): void;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js
new file mode 100644
index 0000000..06942e1
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js
@@ -0,0 +1,995 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+var __spread = (this && this.__spread) || function () {
+ for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("../dom/DOMImpl");
+var interfaces_1 = require("../dom/interfaces");
+var util_1 = require("../util");
+var CustomEventImpl_1 = require("../dom/CustomEventImpl");
+var EventImpl_1 = require("../dom/EventImpl");
+var DOMException_1 = require("../dom/DOMException");
+var TreeAlgorithm_1 = require("./TreeAlgorithm");
+var ShadowTreeAlgorithm_1 = require("./ShadowTreeAlgorithm");
+var DOMAlgorithm_1 = require("./DOMAlgorithm");
+/**
+ * Sets the canceled flag of an event.
+ *
+ * @param event - an event
+ */
+function event_setTheCanceledFlag(event) {
+ if (event._cancelable && !event._inPassiveListenerFlag) {
+ event._canceledFlag = true;
+ }
+}
+exports.event_setTheCanceledFlag = event_setTheCanceledFlag;
+/**
+ * Initializes the value of an event.
+ *
+ * @param event - an event to initialize
+ * @param type - the type of event
+ * @param bubbles - whether the event propagates in reverse
+ * @param cancelable - whether the event can be cancelled
+ */
+function event_initialize(event, type, bubbles, cancelable) {
+ event._initializedFlag = true;
+ event._stopPropagationFlag = false;
+ event._stopImmediatePropagationFlag = false;
+ event._canceledFlag = false;
+ event._isTrusted = false;
+ event._target = null;
+ event._type = type;
+ event._bubbles = bubbles;
+ event._cancelable = cancelable;
+}
+exports.event_initialize = event_initialize;
+/**
+ * Creates a new event.
+ *
+ * @param eventInterface - event interface
+ * @param realm - realm
+ */
+function event_createAnEvent(eventInterface, realm) {
+ if (realm === void 0) { realm = undefined; }
+ /**
+ * 1. If realm is not given, then set it to null.
+ * 2. Let dictionary be the result of converting the JavaScript value
+ * undefined to the dictionary type accepted by eventInterface’s
+ * constructor. (This dictionary type will either be EventInit or a
+ * dictionary that inherits from it.)
+ * 3. Let event be the result of running the inner event creation steps with
+ * eventInterface, realm, the time of the occurrence that the event is
+ * signaling, and dictionary.
+ * 4. Initialize event’s isTrusted attribute to true.
+ * 5. Return event.
+ */
+ if (realm === undefined)
+ realm = null;
+ var dictionary = {};
+ var event = event_innerEventCreationSteps(eventInterface, realm, new Date(), dictionary);
+ event._isTrusted = true;
+ return event;
+}
+exports.event_createAnEvent = event_createAnEvent;
+/**
+ * Performs event creation steps.
+ *
+ * @param eventInterface - event interface
+ * @param realm - realm
+ * @param time - time of occurrance
+ * @param dictionary - event attributes
+ *
+ */
+function event_innerEventCreationSteps(eventInterface, realm, time, dictionary) {
+ /**
+ * 1. Let event be the result of creating a new object using eventInterface.
+ * TODO: Implement realms
+ * If realm is non-null, then use that Realm; otherwise, use the default
+ * behavior defined in Web IDL.
+ */
+ var event = new eventInterface("");
+ /**
+ * 2. Set event’s initialized flag.
+ * 3. Initialize event’s timeStamp attribute to a DOMHighResTimeStamp
+ * representing the high resolution time from the time origin to time.
+ * 4. For each member → value in dictionary, if event has an attribute
+ * whose identifier is member, then initialize that attribute to value.
+ * 5. Run the event constructing steps with event.
+ * 6. Return event.
+ */
+ event._initializedFlag = true;
+ event._timeStamp = time.getTime();
+ Object.assign(event, dictionary);
+ if (DOMImpl_1.dom.features.steps) {
+ DOMAlgorithm_1.dom_runEventConstructingSteps(event);
+ }
+ return event;
+}
+exports.event_innerEventCreationSteps = event_innerEventCreationSteps;
+/**
+ * Dispatches an event to an event target.
+ *
+ * @param event - the event to dispatch
+ * @param target - event target
+ * @param legacyTargetOverrideFlag - legacy target override flag
+ * @param legacyOutputDidListenersThrowFlag - legacy output flag that returns
+ * whether the event listener's callback threw an exception
+ */
+function event_dispatch(event, target, legacyTargetOverrideFlag, legacyOutputDidListenersThrowFlag) {
+ var e_1, _a, e_2, _b;
+ if (legacyTargetOverrideFlag === void 0) { legacyTargetOverrideFlag = false; }
+ if (legacyOutputDidListenersThrowFlag === void 0) { legacyOutputDidListenersThrowFlag = { value: false }; }
+ var clearTargets = false;
+ /**
+ * 1. Set event's dispatch flag.
+ */
+ event._dispatchFlag = true;
+ /**
+ * 2. Let targetOverride be target, if legacy target override flag is not
+ * given, and target's associated Document otherwise.
+ *
+ * _Note:_ legacy target override flag is only used by HTML and only when
+ * target is a Window object.
+ */
+ var targetOverride = target;
+ if (legacyTargetOverrideFlag) {
+ var doc = target._associatedDocument;
+ if (util_1.Guard.isDocumentNode(doc)) {
+ targetOverride = doc;
+ }
+ }
+ /**
+ * 3. Let activationTarget be null.
+ * 4. Let relatedTarget be the result of retargeting event's relatedTarget
+ * against target.
+ * 5. If target is not relatedTarget or target is event's relatedTarget,
+ * then:
+ */
+ var activationTarget = null;
+ var relatedTarget = TreeAlgorithm_1.tree_retarget(event._relatedTarget, target);
+ if (target !== relatedTarget || target === event._relatedTarget) {
+ /**
+ * 5.1. Let touchTargets be a new list.
+ * 5.2. For each touchTarget of event's touch target list, append the
+ * result of retargeting touchTarget against target to touchTargets.
+ * 5.3. Append to an event path with event, target, targetOverride,
+ * relatedTarget, touchTargets, and false.
+ * 5.4. Let isActivationEvent be true, if event is a MouseEvent object
+ * and event's type attribute is "click", and false otherwise.
+ * 5.5. If isActivationEvent is true and target has activation behavior,
+ * then set activationTarget to target.
+ * 5.6. Let slotable be target, if target is a slotable and is assigned,
+ * and null otherwise.
+ * 5.7. Let slot-in-closed-tree be false.
+ * 5.8. Let parent be the result of invoking target's get the parent with
+ * event.
+ */
+ var touchTargets = [];
+ try {
+ for (var _c = __values(event._touchTargetList), _d = _c.next(); !_d.done; _d = _c.next()) {
+ var touchTarget = _d.value;
+ touchTargets.push(TreeAlgorithm_1.tree_retarget(touchTarget, target));
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ event_appendToAnEventPath(event, target, targetOverride, relatedTarget, touchTargets, false);
+ var isActivationEvent = (util_1.Guard.isMouseEvent(event) && event._type === "click");
+ if (isActivationEvent && target._activationBehavior !== undefined) {
+ activationTarget = target;
+ }
+ var slotable = (util_1.Guard.isSlotable(target) && ShadowTreeAlgorithm_1.shadowTree_isAssigned(target)) ?
+ target : null;
+ var slotInClosedTree = false;
+ var parent = target._getTheParent(event);
+ /**
+ * 5.9. While parent is non-null:
+ */
+ while (parent !== null && util_1.Guard.isNode(parent)) {
+ /**
+ * 5.9.1 If slotable is non-null:
+ * 5.9.1.1. Assert: parent is a slot.
+ * 5.9.1.2. Set slotable to null.
+ * 5.9.1.3. If parent's root is a shadow root whose mode is "closed",
+ * then set slot-in-closed-tree to true.
+ */
+ if (slotable !== null) {
+ if (!util_1.Guard.isSlot(parent)) {
+ throw new Error("Parent node of a slotable should be a slot.");
+ }
+ slotable = null;
+ var root = TreeAlgorithm_1.tree_rootNode(parent, true);
+ if (util_1.Guard.isShadowRoot(root) && root._mode === "closed") {
+ slotInClosedTree = true;
+ }
+ }
+ /**
+ * 5.9.2 If parent is a slotable and is assigned, then set slotable to
+ * parent.
+ * 5.9.3. Let relatedTarget be the result of retargeting event's
+ * relatedTarget against parent.
+ * 5.9.4. Let touchTargets be a new list.
+ * 5.9.4. For each touchTarget of event's touch target list, append the
+ * result of retargeting touchTarget against parent to touchTargets.
+ */
+ if (util_1.Guard.isSlotable(parent) && ShadowTreeAlgorithm_1.shadowTree_isAssigned(parent)) {
+ slotable = parent;
+ }
+ relatedTarget = TreeAlgorithm_1.tree_retarget(event._relatedTarget, parent);
+ touchTargets = [];
+ try {
+ for (var _e = (e_2 = void 0, __values(event._touchTargetList)), _f = _e.next(); !_f.done; _f = _e.next()) {
+ var touchTarget = _f.value;
+ touchTargets.push(TreeAlgorithm_1.tree_retarget(touchTarget, parent));
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ /**
+ * 5.9.6. If parent is a Window object, or parent is a node and target's
+ * root is a shadow-including inclusive ancestor of parent, then:
+ */
+ if (util_1.Guard.isWindow(parent) || (util_1.Guard.isNode(parent) && util_1.Guard.isNode(target) &&
+ TreeAlgorithm_1.tree_isAncestorOf(TreeAlgorithm_1.tree_rootNode(target, true), parent, true, true))) {
+ /**
+ * 5.9.6.1. If isActivationEvent is true, event's bubbles attribute
+ * is true, activationTarget is null, and parent has activation
+ * behavior, then set activationTarget to parent.
+ * 5.9.6.2. Append to an event path with event, parent, null,
+ * relatedTarget, touchTargets, and slot-in-closed-tree.
+ */
+ if (isActivationEvent && event._bubbles && activationTarget === null &&
+ parent._activationBehavior) {
+ activationTarget = parent;
+ }
+ event_appendToAnEventPath(event, parent, null, relatedTarget, touchTargets, slotInClosedTree);
+ }
+ else if (parent === relatedTarget) {
+ /**
+ * 5.9.7. Otherwise, if parent is relatedTarget,
+ * then set parent to null.
+ */
+ parent = null;
+ }
+ else {
+ /**
+ * 5.9.8. Otherwise, set target to parent and then:
+ * 5.9.8.1. If isActivationEvent is true, activationTarget is null,
+ * and target has activation behavior, then set activationTarget
+ * to target.
+ * 5.9.8.2. Append to an event path with event, parent, target,
+ * relatedTarget, touchTargets, and slot-in-closed-tree.
+ */
+ target = parent;
+ if (isActivationEvent && activationTarget === null &&
+ target._activationBehavior) {
+ activationTarget = target;
+ }
+ event_appendToAnEventPath(event, parent, target, relatedTarget, touchTargets, slotInClosedTree);
+ }
+ /**
+ * 5.9.9. If parent is non-null, then set parent to the result of
+ * invoking parent's get the parent with event.
+ * 5.9.10. Set slot-in-closed-tree to false.
+ */
+ if (parent !== null) {
+ parent = parent._getTheParent(event);
+ }
+ slotInClosedTree = false;
+ }
+ /**
+ * 5.10. Let clearTargetsStruct be the last struct in event's path whose
+ * shadow-adjusted target is non-null.
+ */
+ var clearTargetsStruct = null;
+ var path = event._path;
+ for (var i = path.length - 1; i >= 0; i--) {
+ var struct = path[i];
+ if (struct.shadowAdjustedTarget !== null) {
+ clearTargetsStruct = struct;
+ break;
+ }
+ }
+ /**
+ * 5.11. Let clearTargets be true if clearTargetsStruct's shadow-adjusted
+ * target, clearTargetsStruct's relatedTarget, or an EventTarget object
+ * in clearTargetsStruct's touch target list is a node and its root is
+ * a shadow root, and false otherwise.
+ */
+ if (clearTargetsStruct !== null) {
+ if (util_1.Guard.isNode(clearTargetsStruct.shadowAdjustedTarget) &&
+ util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(clearTargetsStruct.shadowAdjustedTarget, true))) {
+ clearTargets = true;
+ }
+ else if (util_1.Guard.isNode(clearTargetsStruct.relatedTarget) &&
+ util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(clearTargetsStruct.relatedTarget, true))) {
+ clearTargets = true;
+ }
+ else {
+ for (var j = 0; j < clearTargetsStruct.touchTargetList.length; j++) {
+ var struct = clearTargetsStruct.touchTargetList[j];
+ if (util_1.Guard.isNode(struct) &&
+ util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(struct, true))) {
+ clearTargets = true;
+ break;
+ }
+ }
+ }
+ }
+ /**
+ * 5.12. If activationTarget is non-null and activationTarget has
+ * legacy-pre-activation behavior, then run activationTarget's
+ * legacy-pre-activation behavior.
+ */
+ if (activationTarget !== null &&
+ activationTarget._legacyPreActivationBehavior !== undefined) {
+ activationTarget._legacyPreActivationBehavior(event);
+ }
+ /**
+ * 5.13. For each struct in event's path, in reverse order:
+ */
+ for (var i = path.length - 1; i >= 0; i--) {
+ var struct = path[i];
+ /**
+ * 5.13.1. If struct's shadow-adjusted target is non-null, then set
+ * event's eventPhase attribute to AT_TARGET.
+ * 5.13.2. Otherwise, set event's eventPhase attribute to
+ * CAPTURING_PHASE.
+ * 5.13.3. Invoke with struct, event, "capturing", and
+ * legacyOutputDidListenersThrowFlag if given.
+ */
+ if (struct.shadowAdjustedTarget !== null) {
+ event._eventPhase = interfaces_1.EventPhase.AtTarget;
+ }
+ else {
+ event._eventPhase = interfaces_1.EventPhase.Capturing;
+ }
+ event_invoke(struct, event, "capturing", legacyOutputDidListenersThrowFlag);
+ }
+ /**
+ * 5.14. For each struct in event's path
+ */
+ for (var i = 0; i < path.length; i++) {
+ var struct = path[i];
+ /**
+ * 5.14.1. If struct's shadow-adjusted target is non-null, then set
+ * event's eventPhase attribute to AT_TARGET.
+ * 5.14.2. Otherwise:
+ * 5.14.2.1. If event's bubbles attribute is false, then continue.
+ * 5.14.2.2. Set event's eventPhase attribute to BUBBLING_PHASE.
+ * 5.14.3. Invoke with struct, event, "bubbling", and
+ * legacyOutputDidListenersThrowFlag if given.
+ */
+ if (struct.shadowAdjustedTarget !== null) {
+ event._eventPhase = interfaces_1.EventPhase.AtTarget;
+ }
+ else {
+ if (!event._bubbles)
+ continue;
+ event._eventPhase = interfaces_1.EventPhase.Bubbling;
+ }
+ event_invoke(struct, event, "bubbling", legacyOutputDidListenersThrowFlag);
+ }
+ }
+ /**
+ * 6. Set event's eventPhase attribute to NONE.
+ * 7. Set event's currentTarget attribute to null.
+ * 8. Set event's path to the empty list.
+ * 9. Unset event's dispatch flag, stop propagation flag, and stop
+ * immediate propagation flag.
+ */
+ event._eventPhase = interfaces_1.EventPhase.None;
+ event._currentTarget = null;
+ event._path = [];
+ event._dispatchFlag = false;
+ event._stopPropagationFlag = false;
+ event._stopImmediatePropagationFlag = false;
+ /**
+ * 10. If clearTargets, then:
+ * 10.1. Set event's target to null.
+ * 10.2. Set event's relatedTarget to null.
+ * 10.3. Set event's touch target list to the empty list.
+ */
+ if (clearTargets) {
+ event._target = null;
+ event._relatedTarget = null;
+ event._touchTargetList = [];
+ }
+ /**
+ * 11. If activationTarget is non-null, then:
+ * 11.1. If event's canceled flag is unset, then run activationTarget's
+ * activation behavior with event.
+ * 11.2. Otherwise, if activationTarget has legacy-canceled-activation
+ * behavior, then run activationTarget's legacy-canceled-activation
+ * behavior.
+ */
+ if (activationTarget !== null) {
+ if (!event._canceledFlag && activationTarget._activationBehavior !== undefined) {
+ activationTarget._activationBehavior(event);
+ }
+ else if (activationTarget._legacyCanceledActivationBehavior !== undefined) {
+ activationTarget._legacyCanceledActivationBehavior(event);
+ }
+ }
+ /**
+ * 12. Return false if event's canceled flag is set, and true otherwise.
+ */
+ return !event._canceledFlag;
+}
+exports.event_dispatch = event_dispatch;
+/**
+ * Appends a new struct to an event's path.
+ *
+ * @param event - an event
+ * @param invocationTarget - the target of the invocation
+ * @param shadowAdjustedTarget - shadow-root adjusted event target
+ * @param relatedTarget - related event target
+ * @param touchTargets - a list of touch targets
+ * @param slotInClosedTree - if the target's parent is a closed shadow root
+ */
+function event_appendToAnEventPath(event, invocationTarget, shadowAdjustedTarget, relatedTarget, touchTargets, slotInClosedTree) {
+ /**
+ * 1. Let invocationTargetInShadowTree be false.
+ * 2. If invocationTarget is a node and its root is a shadow root, then
+ * set invocationTargetInShadowTree to true.
+ */
+ var invocationTargetInShadowTree = false;
+ if (util_1.Guard.isNode(invocationTarget) &&
+ util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(invocationTarget))) {
+ invocationTargetInShadowTree = true;
+ }
+ /**
+ * 3. Let root-of-closed-tree be false.
+ * 4. If invocationTarget is a shadow root whose mode is "closed", then
+ * set root-of-closed-tree to true.
+ */
+ var rootOfClosedTree = false;
+ if (util_1.Guard.isShadowRoot(invocationTarget) &&
+ invocationTarget._mode === "closed") {
+ rootOfClosedTree = true;
+ }
+ /**
+ * 5. Append a new struct to event's path whose invocation target is
+ * invocationTarget, invocation-target-in-shadow-tree is
+ * invocationTargetInShadowTree, shadow-adjusted target is
+ * shadowAdjustedTarget, relatedTarget is relatedTarget,
+ * touch target list is touchTargets, root-of-closed-tree is
+ * root-of-closed-tree, and slot-in-closed-tree is slot-in-closed-tree.
+ */
+ event._path.push({
+ invocationTarget: invocationTarget,
+ invocationTargetInShadowTree: invocationTargetInShadowTree,
+ shadowAdjustedTarget: shadowAdjustedTarget,
+ relatedTarget: relatedTarget,
+ touchTargetList: touchTargets,
+ rootOfClosedTree: rootOfClosedTree,
+ slotInClosedTree: slotInClosedTree
+ });
+}
+exports.event_appendToAnEventPath = event_appendToAnEventPath;
+/**
+ * Invokes an event.
+ *
+ * @param struct - a struct defining event's path
+ * @param event - the event to invoke
+ * @param phase - event phase
+ * @param legacyOutputDidListenersThrowFlag - legacy output flag that returns
+ * whether the event listener's callback threw an exception
+ */
+function event_invoke(struct, event, phase, legacyOutputDidListenersThrowFlag) {
+ if (legacyOutputDidListenersThrowFlag === void 0) { legacyOutputDidListenersThrowFlag = { value: false }; }
+ /**
+ * 1. Set event's target to the shadow-adjusted target of the last struct
+ * in event's path, that is either struct or preceding struct, whose
+ * shadow-adjusted target is non-null.
+ */
+ var path = event._path;
+ var index = -1;
+ for (var i = 0; i < path.length; i++) {
+ if (path[i] === struct) {
+ index = i;
+ break;
+ }
+ }
+ if (index !== -1) {
+ var item = path[index];
+ if (item.shadowAdjustedTarget !== null) {
+ event._target = item.shadowAdjustedTarget;
+ }
+ else if (index > 0) {
+ item = path[index - 1];
+ if (item.shadowAdjustedTarget !== null) {
+ event._target = item.shadowAdjustedTarget;
+ }
+ }
+ }
+ /**
+ * 2. Set event's relatedTarget to struct's relatedTarget.
+ * 3. Set event's touch target list to struct's touch target list.
+ * 4. If event's stop propagation flag is set, then return.
+ * 5. Initialize event's currentTarget attribute to struct's invocation
+ * target.
+ * 6. Let listeners be a clone of event's currentTarget attribute value's
+ * event listener list.
+ *
+ * _Note:_ This avoids event listeners added after this point from being
+ * run. Note that removal still has an effect due to the removed field.
+ */
+ event._relatedTarget = struct.relatedTarget;
+ event._touchTargetList = struct.touchTargetList;
+ if (event._stopPropagationFlag)
+ return;
+ event._currentTarget = struct.invocationTarget;
+ var currentTarget = event._currentTarget;
+ var targetListeners = currentTarget._eventListenerList;
+ var listeners = new (Array.bind.apply(Array, __spread([void 0], targetListeners)))();
+ /**
+ * 7. Let found be the result of running inner invoke with event, listeners,
+ * phase, and legacyOutputDidListenersThrowFlag if given.
+ */
+ var found = event_innerInvoke(event, listeners, phase, struct, legacyOutputDidListenersThrowFlag);
+ /**
+ * 8. If found is false and event's isTrusted attribute is true, then:
+ */
+ if (!found && event._isTrusted) {
+ /**
+ * 8.1. Let originalEventType be event's type attribute value.
+ * 8.2. If event's type attribute value is a match for any of the strings
+ * in the first column in the following table, set event's type attribute
+ * value to the string in the second column on the same row as the matching
+ * string, and return otherwise.
+ *
+ * Event type | Legacy event type
+ * -------------------------------------------------
+ * "animationend" | "webkitAnimationEnd"
+ * "animationiteration" | "webkitAnimationIteration"
+ * "animationstart" | "webkitAnimationStart"
+ * "transitionend" | "webkitTransitionEnd"
+ */
+ var originalEventType = event._type;
+ if (originalEventType === "animationend") {
+ event._type = "webkitAnimationEnd";
+ }
+ else if (originalEventType === "animationiteration") {
+ event._type = "webkitAnimationIteration";
+ }
+ else if (originalEventType === "animationstart") {
+ event._type = "webkitAnimationStart";
+ }
+ else if (originalEventType === "transitionend") {
+ event._type = "webkitTransitionEnd";
+ }
+ /**
+ * 8.3. Inner invoke with event, listeners, phase, and
+ * legacyOutputDidListenersThrowFlag if given.
+ * 8.4. Set event's type attribute value to originalEventType.
+ */
+ event_innerInvoke(event, listeners, phase, struct, legacyOutputDidListenersThrowFlag);
+ event._type = originalEventType;
+ }
+}
+exports.event_invoke = event_invoke;
+/**
+ * Invokes an event.
+ *
+ * @param event - the event to invoke
+ * @param listeners - event listeners
+ * @param phase - event phase
+ * @param struct - a struct defining event's path
+ * @param legacyOutputDidListenersThrowFlag - legacy output flag that returns
+ * whether the event listener's callback threw an exception
+ */
+function event_innerInvoke(event, listeners, phase, struct, legacyOutputDidListenersThrowFlag) {
+ if (legacyOutputDidListenersThrowFlag === void 0) { legacyOutputDidListenersThrowFlag = { value: false }; }
+ /**
+ * 1. Let found be false.
+ * 2. For each listener in listeners, whose removed is false:
+ */
+ var found = false;
+ for (var i = 0; i < listeners.length; i++) {
+ var listener = listeners[i];
+ if (!listener.removed) {
+ /**
+ * 2.1. If event's type attribute value is not listener's type, then
+ * continue.
+ * 2.2. Set found to true.
+ * 2.3. If phase is "capturing" and listener's capture is false, then
+ * continue.
+ * 2.4. If phase is "bubbling" and listener's capture is true, then
+ * continue.
+ */
+ if (event._type !== listener.type)
+ continue;
+ found = true;
+ if (phase === "capturing" && !listener.capture)
+ continue;
+ if (phase === "bubbling" && listener.capture)
+ continue;
+ /**
+ * 2.5. If listener's once is true, then remove listener from event's
+ * currentTarget attribute value's event listener list.
+ */
+ if (listener.once && event._currentTarget !== null) {
+ var impl = event._currentTarget;
+ var index = -1;
+ for (var i_1 = 0; i_1 < impl._eventListenerList.length; i_1++) {
+ if (impl._eventListenerList[i_1] === listener) {
+ index = i_1;
+ break;
+ }
+ }
+ if (index !== -1) {
+ impl._eventListenerList.splice(index, 1);
+ }
+ }
+ /**
+ * TODO: Implement realms
+ *
+ * 2.6. Let global be listener callback's associated Realm's global
+ * object.
+ */
+ var globalObject = undefined;
+ /**
+ * 2.7. Let currentEvent be undefined.
+ * 2.8. If global is a Window object, then:
+ * 2.8.1. Set currentEvent to global's current event.
+ * 2.8.2. If struct's invocation-target-in-shadow-tree is false, then
+ * set global's current event to event.
+ */
+ var currentEvent = undefined;
+ if (util_1.Guard.isWindow(globalObject)) {
+ currentEvent = globalObject._currentEvent;
+ if (struct.invocationTargetInShadowTree === false) {
+ globalObject._currentEvent = event;
+ }
+ }
+ /**
+ * 2.9. If listener's passive is true, then set event's in passive
+ * listener flag.
+ * 2.10. Call a user object's operation with listener's callback,
+ * "handleEvent", « event », and event's currentTarget attribute value.
+ */
+ if (listener.passive)
+ event._inPassiveListenerFlag = true;
+ try {
+ listener.callback.handleEvent.call(event._currentTarget, event);
+ }
+ catch (err) {
+ /**
+ * If this throws an exception, then:
+ * 2.10.1. Report the exception.
+ * 2.10.2. Set legacyOutputDidListenersThrowFlag if given.
+ *
+ * _Note:_ The legacyOutputDidListenersThrowFlag is only used by
+ * Indexed Database API.
+ * TODO: Report the exception
+ * See: https://html.spec.whatwg.org/multipage/webappapis.html#runtime-script-errors-in-documents
+ */
+ legacyOutputDidListenersThrowFlag.value = true;
+ }
+ /**
+ * 2.11. Unset event's in passive listener flag.
+ */
+ if (listener.passive)
+ event._inPassiveListenerFlag = false;
+ /**
+ * 2.12. If global is a Window object, then set global's current event
+ * to currentEvent.
+ */
+ if (util_1.Guard.isWindow(globalObject)) {
+ globalObject._currentEvent = currentEvent;
+ }
+ /**
+ * 2.13. If event's stop immediate propagation flag is set, then return
+ * found.
+ */
+ if (event._stopImmediatePropagationFlag)
+ return found;
+ }
+ }
+ /**
+ * 3. Return found.
+ */
+ return found;
+}
+exports.event_innerInvoke = event_innerInvoke;
+/**
+ * Fires an event at target.
+ * @param e - event name
+ * @param target - event target
+ * @param eventConstructor - an event constructor, with a description of how
+ * IDL attributes are to be initialized
+ * @param idlAttributes - a dictionary describing how IDL attributes are
+ * to be initialized
+ * @param legacyTargetOverrideFlag - legacy target override flag
+ */
+function event_fireAnEvent(e, target, eventConstructor, idlAttributes, legacyTargetOverrideFlag) {
+ /**
+ * 1. If eventConstructor is not given, then let eventConstructor be Event.
+ */
+ if (eventConstructor === undefined) {
+ eventConstructor = EventImpl_1.EventImpl;
+ }
+ /**
+ * 2. Let event be the result of creating an event given eventConstructor,
+ * in the relevant Realm of target.
+ */
+ var event = event_createAnEvent(eventConstructor);
+ /**
+ * 3. Initialize event’s type attribute to e.
+ */
+ event._type = e;
+ /**
+ * 4. Initialize any other IDL attributes of event as described in the
+ * invocation of this algorithm.
+ * _Note:_ This also allows for the isTrusted attribute to be set to false.
+ */
+ if (idlAttributes) {
+ for (var key in idlAttributes) {
+ var idlObj = event;
+ idlObj[key] = idlAttributes[key];
+ }
+ }
+ /**
+ * 5. Return the result of dispatching event at target, with legacy target
+ * override flag set if set.
+ */
+ return event_dispatch(event, target, legacyTargetOverrideFlag);
+}
+exports.event_fireAnEvent = event_fireAnEvent;
+/**
+ * Creates an event.
+ *
+ * @param eventInterface - the name of the event interface
+ */
+function event_createLegacyEvent(eventInterface) {
+ /**
+ * 1. Let constructor be null.
+ */
+ var constructor = null;
+ /**
+ * TODO: Implement in HTML DOM
+ * 2. If interface is an ASCII case-insensitive match for any of the strings
+ * in the first column in the following table, then set constructor to the
+ * interface in the second column on the same row as the matching string:
+ *
+ * String | Interface
+ * -------|----------
+ * "beforeunloadevent" | BeforeUnloadEvent
+ * "compositionevent" | CompositionEvent
+ * "customevent" | CustomEvent
+ * "devicemotionevent" | DeviceMotionEvent
+ * "deviceorientationevent" | DeviceOrientationEvent
+ * "dragevent" | DragEvent
+ * "event" | Event
+ * "events" | Event
+ * "focusevent" | FocusEvent
+ * "hashchangeevent" | HashChangeEvent
+ * "htmlevents" | Event
+ * "keyboardevent" | KeyboardEvent
+ * "messageevent" | MessageEvent
+ * "mouseevent" | MouseEvent
+ * "mouseevents" |
+ * "storageevent" | StorageEvent
+ * "svgevents" | Event
+ * "textevent" | CompositionEvent
+ * "touchevent" | TouchEvent
+ * "uievent" | UIEvent
+ * "uievents" | UIEvent
+ */
+ switch (eventInterface.toLowerCase()) {
+ case "beforeunloadevent":
+ break;
+ case "compositionevent":
+ break;
+ case "customevent":
+ constructor = CustomEventImpl_1.CustomEventImpl;
+ break;
+ case "devicemotionevent":
+ break;
+ case "deviceorientationevent":
+ break;
+ case "dragevent":
+ break;
+ case "event":
+ case "events":
+ constructor = EventImpl_1.EventImpl;
+ break;
+ case "focusevent":
+ break;
+ case "hashchangeevent":
+ break;
+ case "htmlevents":
+ break;
+ case "keyboardevent":
+ break;
+ case "messageevent":
+ break;
+ case "mouseevent":
+ break;
+ case "mouseevents":
+ break;
+ case "storageevent":
+ break;
+ case "svgevents":
+ break;
+ case "textevent":
+ break;
+ case "touchevent":
+ break;
+ case "uievent":
+ break;
+ case "uievents":
+ break;
+ }
+ /**
+ * 3. If constructor is null, then throw a "NotSupportedError" DOMException.
+ */
+ if (constructor === null) {
+ throw new DOMException_1.NotSupportedError("Event constructor not found for interface " + eventInterface + ".");
+ }
+ /**
+ * 4. If the interface indicated by constructor is not exposed on the
+ * relevant global object of the context object, then throw a
+ * "NotSupportedError" DOMException.
+ * _Note:_ Typically user agents disable support for touch events in some
+ * configurations, in which case this clause would be triggered for the
+ * interface TouchEvent.
+ */
+ // TODO: Implement realms
+ /**
+ * 5. Let event be the result of creating an event given constructor.
+ * 6. Initialize event’s type attribute to the empty string.
+ * 7. Initialize event’s timeStamp attribute to a DOMHighResTimeStamp
+ * representing the high resolution time from the time origin to now.
+ * 8. Initialize event’s isTrusted attribute to false.
+ * 9. Unset event’s initialized flag.
+ */
+ var event = new constructor("");
+ event._type = "";
+ event._timeStamp = new Date().getTime();
+ event._isTrusted = false;
+ event._initializedFlag = false;
+ /**
+ * 10. Return event.
+ */
+ return event;
+}
+exports.event_createLegacyEvent = event_createLegacyEvent;
+/**
+ * Getter of an event handler IDL attribute.
+ *
+ * @param eventTarget - event target
+ * @param name - event name
+ */
+function event_getterEventHandlerIDLAttribute(thisObj, name) {
+ /**
+ * 1. Let eventTarget be the result of determining the target of an event
+ * handler given this object and name.
+ * 2. If eventTarget is null, then return null.
+ * 3. Return the result of getting the current value of the event handler
+ * given eventTarget and name.
+ */
+ var eventTarget = event_determineTheTargetOfAnEventHandler(thisObj, name);
+ if (eventTarget === null)
+ return null;
+ return event_getTheCurrentValueOfAnEventHandler(eventTarget, name);
+}
+exports.event_getterEventHandlerIDLAttribute = event_getterEventHandlerIDLAttribute;
+/**
+ * Setter of an event handler IDL attribute.
+ *
+ * @param eventTarget - event target
+ * @param name - event name
+ * @param value - event handler
+ */
+function event_setterEventHandlerIDLAttribute(thisObj, name, value) {
+ /**
+ * 1. Let eventTarget be the result of determining the target of an event
+ * handler given this object and name.
+ * 2. If eventTarget is null, then return.
+ * 3. If the given value is null, then deactivate an event handler given
+ * eventTarget and name.
+ * 4. Otherwise:
+ * 4.1. Let handlerMap be eventTarget's event handler map.
+ * 4.2. Let eventHandler be handlerMap[name].
+ * 4.3. Set eventHandler's value to the given value.
+ * 4.4. Activate an event handler given eventTarget and name.
+ */
+ var eventTarget = event_determineTheTargetOfAnEventHandler(thisObj, name);
+ if (eventTarget === null)
+ return;
+ if (value === null) {
+ event_deactivateAnEventHandler(eventTarget, name);
+ }
+ else {
+ var handlerMap = eventTarget._eventHandlerMap;
+ var eventHandler = handlerMap["onabort"];
+ if (eventHandler !== undefined) {
+ eventHandler.value = value;
+ }
+ event_activateAnEventHandler(eventTarget, name);
+ }
+}
+exports.event_setterEventHandlerIDLAttribute = event_setterEventHandlerIDLAttribute;
+/**
+ * Determines the target of an event handler.
+ *
+ * @param eventTarget - event target
+ * @param name - event name
+ */
+function event_determineTheTargetOfAnEventHandler(eventTarget, name) {
+ // TODO: Implement in HTML DOM
+ return null;
+}
+exports.event_determineTheTargetOfAnEventHandler = event_determineTheTargetOfAnEventHandler;
+/**
+ * Gets the current value of an event handler.
+ *
+ * @param eventTarget - event target
+ * @param name - event name
+ */
+function event_getTheCurrentValueOfAnEventHandler(eventTarget, name) {
+ // TODO: Implement in HTML DOM
+ return null;
+}
+exports.event_getTheCurrentValueOfAnEventHandler = event_getTheCurrentValueOfAnEventHandler;
+/**
+ * Activates an event handler.
+ *
+ * @param eventTarget - event target
+ * @param name - event name
+ */
+function event_activateAnEventHandler(eventTarget, name) {
+ // TODO: Implement in HTML DOM
+}
+exports.event_activateAnEventHandler = event_activateAnEventHandler;
+/**
+ * Deactivates an event handler.
+ *
+ * @param eventTarget - event target
+ * @param name - event name
+ */
+function event_deactivateAnEventHandler(eventTarget, name) {
+ // TODO: Implement in HTML DOM
+}
+exports.event_deactivateAnEventHandler = event_deactivateAnEventHandler;
+//# sourceMappingURL=EventAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js.map
new file mode 100644
index 0000000..7263816
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"EventAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/EventAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAoC;AACpC,gDAG0B;AAC1B,gCAA+B;AAC/B,0DAAwD;AACxD,8CAA4C;AAC5C,oDAAuD;AACvD,iDAAiF;AACjF,6DAA6D;AAC7D,+CAA8D;AAS9D;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,KAAY;IACnD,IAAI,KAAK,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE;QACtD,KAAK,CAAC,aAAa,GAAG,IAAI,CAAA;KAC3B;AACH,CAAC;AAJD,4DAIC;AAED;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAAC,KAAY,EAAE,IAAY,EAAE,OAAgB,EAAE,UAAmB;IAChG,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAA;IAC7B,KAAK,CAAC,oBAAoB,GAAG,KAAK,CAAA;IAClC,KAAK,CAAC,6BA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IAAY;IACZ,8BAA8B;IAC9B,OAAO,IAAI,CAAA;AACb,CAAC;AAJD,4FAIC;AAED;;;;;GAKG;AACH,SAAgB,wCAAwC,CAAC,WAAwB,EAC/E,IAAY;IACZ,8BAA8B;IAC9B,OAAO,IAAI,CAAA;AACb,CAAC;AAJD,4FAIC;AAED;;;;;GAKG;AACH,SAAgB,4BAA4B,CAAC,WAAwB,EACnE,IAAY;IACZ,8BAA8B;AAChC,CAAC;AAHD,oEAGC;AAED;;;;;GAKG;AACH,SAAgB,8BAA8B,CAAC,WAAwB,EACrE,IAAY;IACZ,8BAA8B;AAChC,CAAC;AAHD,wEAGC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.d.ts
new file mode 100644
index 0000000..6f749b7
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.d.ts
@@ -0,0 +1,33 @@
+import { EventListenerOptions, AddEventListenerOptions, EventListenerEntry, EventTarget } from "../dom/interfaces";
+/**
+ * Flattens the given options argument.
+ *
+ * @param options - options argument
+ */
+export declare function eventTarget_flatten(options: EventListenerOptions | boolean): boolean;
+/**
+ * Flattens the given options argument.
+ *
+ * @param options - options argument
+ */
+export declare function eventTarget_flattenMore(options: AddEventListenerOptions | boolean): [boolean, boolean, boolean];
+/**
+ * Adds a new event listener.
+ *
+ * @param eventTarget - event target
+ * @param listener - event listener
+ */
+export declare function eventTarget_addEventListener(eventTarget: EventTarget, listener: EventListenerEntry): void;
+/**
+ * Removes an event listener.
+ *
+ * @param eventTarget - event target
+ * @param listener - event listener
+ */
+export declare function eventTarget_removeEventListener(eventTarget: EventTarget, listener: EventListenerEntry, index: number): void;
+/**
+ * Removes all event listeners.
+ *
+ * @param eventTarget - event target
+ */
+export declare function eventTarget_removeAllEventListeners(eventTarget: EventTarget): void;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js
new file mode 100644
index 0000000..12e4076
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js
@@ -0,0 +1,142 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("@oozcitak/util");
+/**
+ * Flattens the given options argument.
+ *
+ * @param options - options argument
+ */
+function eventTarget_flatten(options) {
+ /**
+ * 1. If options is a boolean, then return options.
+ * 2. Return options’s capture.
+ */
+ if (util_1.isBoolean(options)) {
+ return options;
+ }
+ else {
+ return options.capture || false;
+ }
+}
+exports.eventTarget_flatten = eventTarget_flatten;
+/**
+ * Flattens the given options argument.
+ *
+ * @param options - options argument
+ */
+function eventTarget_flattenMore(options) {
+ /**
+ * 1. Let capture be the result of flattening options.
+ * 2. Let once and passive be false.
+ * 3. If options is a dictionary, then set passive to options’s passive and
+ * once to options’s once.
+ * 4. Return capture, passive, and once.
+ */
+ var capture = eventTarget_flatten(options);
+ var once = false;
+ var passive = false;
+ if (!util_1.isBoolean(options)) {
+ once = options.once || false;
+ passive = options.passive || false;
+ }
+ return [capture, passive, once];
+}
+exports.eventTarget_flattenMore = eventTarget_flattenMore;
+/**
+ * Adds a new event listener.
+ *
+ * @param eventTarget - event target
+ * @param listener - event listener
+ */
+function eventTarget_addEventListener(eventTarget, listener) {
+ /**
+ * 1. If eventTarget is a ServiceWorkerGlobalScope object, its service
+ * worker’s script resource’s has ever been evaluated flag is set, and
+ * listener’s type matches the type attribute value of any of the service
+ * worker events, then report a warning to the console that this might not
+ * give the expected results. [SERVICE-WORKERS]
+ */
+ // TODO: service worker
+ /**
+ * 2. If listener’s callback is null, then return.
+ */
+ if (listener.callback === null)
+ return;
+ /**
+ * 3. If eventTarget’s event listener list does not contain an event listener
+ * whose type is listener’s type, callback is listener’s callback, and capture
+ * is listener’s capture, then append listener to eventTarget’s event listener
+ * list.
+ */
+ for (var i = 0; i < eventTarget._eventListenerList.length; i++) {
+ var entry = eventTarget._eventListenerList[i];
+ if (entry.type === listener.type && entry.callback.handleEvent === listener.callback.handleEvent
+ && entry.capture === listener.capture) {
+ return;
+ }
+ }
+ eventTarget._eventListenerList.push(listener);
+}
+exports.eventTarget_addEventListener = eventTarget_addEventListener;
+/**
+ * Removes an event listener.
+ *
+ * @param eventTarget - event target
+ * @param listener - event listener
+ */
+function eventTarget_removeEventListener(eventTarget, listener, index) {
+ /**
+ * 1. If eventTarget is a ServiceWorkerGlobalScope object and its service
+ * worker’s set of event types to handle contains type, then report a
+ * warning to the console that this might not give the expected results.
+ * [SERVICE-WORKERS]
+ */
+ // TODO: service worker
+ /**
+ * 2. Set listener’s removed to true and remove listener from eventTarget’s
+ * event listener list.
+ */
+ listener.removed = true;
+ eventTarget._eventListenerList.splice(index, 1);
+}
+exports.eventTarget_removeEventListener = eventTarget_removeEventListener;
+/**
+ * Removes all event listeners.
+ *
+ * @param eventTarget - event target
+ */
+function eventTarget_removeAllEventListeners(eventTarget) {
+ /**
+ * To remove all event listeners, given an EventTarget object eventTarget,
+ * for each listener of eventTarget’s event listener list, remove an event
+ * listener with eventTarget and listener.
+ */
+ var e_1, _a;
+ try {
+ for (var _b = __values(eventTarget._eventListenerList), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var e = _c.value;
+ e.removed = true;
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ eventTarget._eventListenerList.length = 0;
+}
+exports.eventTarget_removeAllEventListeners = eventTarget_removeAllEventListeners;
+//# sourceMappingURL=EventTargetAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js.map
new file mode 100644
index 0000000..911ef05
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"EventTargetAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/EventTargetAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAGA,uCAA0C;AAE1C;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,OAAuC;IACzE;;;OAGG;IACH,IAAI,gBAAS,CAAC,OAAO,CAAC,EAAE;QACtB,OAAO,OAAO,CAAA;KACf;SAAM;QACL,OAAO,OAAO,CAAC,OAAO,IAAI,KAAK,CAAA;KAChC;AACH,CAAC;AAVD,kDAUC;AAED;;;;GAIG;AACH,SAAgB,uBAAuB,CAAC,OAA0C;IAChF;;;;;;OAMG;IACH,IAAM,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAA;IAC5C,IAAI,IAAI,GAAG,KAAK,CAAA;IAChB,IAAI,OAAO,GAAG,KAAK,CAAA;IACnB,IAAI,CAAC,gBAAS,CAAC,OAAO,CAAC,EAAE;QACvB,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,KAAK,CAAA;QAC5B,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,KAAK,CAAA;KACnC;IACD,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;AACjC,CAAC;AAhBD,0DAgBC;AAED;;;;;GAKG;AACH,SAAgB,4BAA4B,CAAC,WAAwB,EACnE,QAA4B;IAE5B;;;;;;OAMG;IACH,uBAAuB;IAEvB;;OAEG;IACH,IAAI,QAAQ,CAAC,QAAQ,KAAK,IAAI;QAAE,OAAM;IAEtC;;;;;OAKG;IACH,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC9D,IAAM,KAAK,GAAG,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAA;QAC/C,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,WAAW,KAAK,QAAQ,CAAC,QAAQ,CAAC,WAAW;eAC3F,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,EAAE;YACvC,OAAM;SACP;KACF;IAED,WAAW,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC/C,CAAC;AAhCD,oEAgCC;AAED;;;;;GAKG;AACH,SAAgB,+BAA+B,CAAC,WAAwB,EACtE,QAA4B,EAAE,KAAa;IAE3C;;;;;OAKG;IACH,uBAAuB;IAEvB;;;OAGG;IACH,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAA;IAEvB,WAAW,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;AACjD,CAAC;AAlBD,0EAkBC;AAED;;;;GAIG;AACH,SAAgB,mCAAmC,CAAC,WAAwB;IAC1E;;;;OAIG;;;QAEH,KAAgB,IAAA,KAAA,SAAA,WAAW,CAAC,kBAAkB,CAAA,gBAAA,4BAAE;YAA3C,IAAM,CAAC,WAAA;YACV,CAAC,CAAC,OAAO,GAAG,IAAI,CAAA;SACjB;;;;;;;;;IAED,WAAW,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAA;AAC3C,CAAC;AAZD,kFAYC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.d.ts
new file mode 100644
index 0000000..cdb1b80
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.d.ts
@@ -0,0 +1,66 @@
+import { Node } from "../dom/interfaces";
+/**
+ * Ensures pre-insertion validity of a node into a parent before a
+ * child.
+ *
+ * @param node - node to insert
+ * @param parent - parent node to receive node
+ * @param child - child node to insert node before
+ */
+export declare function mutation_ensurePreInsertionValidity(node: Node, parent: Node, child: Node | null): void;
+/**
+ * Ensures pre-insertion validity of a node into a parent before a
+ * child, then adopts the node to the tree and inserts it.
+ *
+ * @param node - node to insert
+ * @param parent - parent node to receive node
+ * @param child - child node to insert node before
+ */
+export declare function mutation_preInsert(node: Node, parent: Node, child: Node | null): Node;
+/**
+ * Inserts a node into a parent node before the given child node.
+ *
+ * @param node - node to insert
+ * @param parent - parent node to receive node
+ * @param child - child node to insert node before
+ * @param suppressObservers - whether to notify observers
+ */
+export declare function mutation_insert(node: Node, parent: Node, child: Node | null, suppressObservers?: boolean): void;
+/**
+ * Appends a node to the children of a parent node.
+ *
+ * @param node - a node
+ * @param parent - the parent to receive node
+ */
+export declare function mutation_append(node: Node, parent: Node): Node;
+/**
+ * Replaces a node with another node.
+ *
+ * @param child - child node to remove
+ * @param node - node to insert
+ * @param parent - parent node to receive node
+ */
+export declare function mutation_replace(child: Node, node: Node, parent: Node): Node;
+/**
+ * Replaces all nodes of a parent with the given node.
+ *
+ * @param node - node to insert
+ * @param parent - parent node to receive node
+ */
+export declare function mutation_replaceAll(node: Node | null, parent: Node): void;
+/**
+ * Ensures pre-removal validity of a child node from a parent, then
+ * removes it.
+ *
+ * @param child - child node to remove
+ * @param parent - parent node
+ */
+export declare function mutation_preRemove(child: Node, parent: Node): Node;
+/**
+ * Removes a child node from its parent.
+ *
+ * @param node - node to remove
+ * @param parent - parent node
+ * @param suppressObservers - whether to notify observers
+ */
+export declare function mutation_remove(node: Node, parent: Node, suppressObservers?: boolean): void;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js
new file mode 100644
index 0000000..8960b60
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js
@@ -0,0 +1,1173 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+var __spread = (this && this.__spread) || function () {
+ for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("../dom/DOMImpl");
+var DOMException_1 = require("../dom/DOMException");
+var interfaces_1 = require("../dom/interfaces");
+var util_1 = require("../util");
+var util_2 = require("@oozcitak/util");
+var infra_1 = require("@oozcitak/infra");
+var CustomElementAlgorithm_1 = require("./CustomElementAlgorithm");
+var TreeAlgorithm_1 = require("./TreeAlgorithm");
+var NodeIteratorAlgorithm_1 = require("./NodeIteratorAlgorithm");
+var ShadowTreeAlgorithm_1 = require("./ShadowTreeAlgorithm");
+var MutationObserverAlgorithm_1 = require("./MutationObserverAlgorithm");
+var DOMAlgorithm_1 = require("./DOMAlgorithm");
+var DocumentAlgorithm_1 = require("./DocumentAlgorithm");
+/**
+ * Ensures pre-insertion validity of a node into a parent before a
+ * child.
+ *
+ * @param node - node to insert
+ * @param parent - parent node to receive node
+ * @param child - child node to insert node before
+ */
+function mutation_ensurePreInsertionValidity(node, parent, child) {
+ var e_1, _a, e_2, _b, e_3, _c, e_4, _d;
+ var parentNodeType = parent._nodeType;
+ var nodeNodeType = node._nodeType;
+ var childNodeType = child ? child._nodeType : null;
+ /**
+ * 1. If parent is not a Document, DocumentFragment, or Element node,
+ * throw a "HierarchyRequestError" DOMException.
+ */
+ if (parentNodeType !== interfaces_1.NodeType.Document &&
+ parentNodeType !== interfaces_1.NodeType.DocumentFragment &&
+ parentNodeType !== interfaces_1.NodeType.Element)
+ throw new DOMException_1.HierarchyRequestError("Only document, document fragment and element nodes can contain child nodes. Parent node is " + parent.nodeName + ".");
+ /**
+ * 2. If node is a host-including inclusive ancestor of parent, throw a
+ * "HierarchyRequestError" DOMException.
+ */
+ if (TreeAlgorithm_1.tree_isHostIncludingAncestorOf(parent, node, true))
+ throw new DOMException_1.HierarchyRequestError("The node to be inserted cannot be an inclusive ancestor of parent node. Node is " + node.nodeName + ", parent node is " + parent.nodeName + ".");
+ /**
+ * 3. If child is not null and its parent is not parent, then throw a
+ * "NotFoundError" DOMException.
+ */
+ if (child !== null && child._parent !== parent)
+ throw new DOMException_1.NotFoundError("The reference child node cannot be found under parent node. Child node is " + child.nodeName + ", parent node is " + parent.nodeName + ".");
+ /**
+ * 4. If node is not a DocumentFragment, DocumentType, Element, Text,
+ * ProcessingInstruction, or Comment node, throw a "HierarchyRequestError"
+ * DOMException.
+ */
+ if (nodeNodeType !== interfaces_1.NodeType.DocumentFragment &&
+ nodeNodeType !== interfaces_1.NodeType.DocumentType &&
+ nodeNodeType !== interfaces_1.NodeType.Element &&
+ nodeNodeType !== interfaces_1.NodeType.Text &&
+ nodeNodeType !== interfaces_1.NodeType.ProcessingInstruction &&
+ nodeNodeType !== interfaces_1.NodeType.CData &&
+ nodeNodeType !== interfaces_1.NodeType.Comment)
+ throw new DOMException_1.HierarchyRequestError("Only document fragment, document type, element, text, processing instruction, cdata section or comment nodes can be inserted. Node is " + node.nodeName + ".");
+ /**
+ * 5. If either node is a Text node and parent is a document, or node is a
+ * doctype and parent is not a document, throw a "HierarchyRequestError"
+ * DOMException.
+ */
+ if (nodeNodeType === interfaces_1.NodeType.Text &&
+ parentNodeType === interfaces_1.NodeType.Document)
+ throw new DOMException_1.HierarchyRequestError("Cannot insert a text node as a child of a document node. Node is " + node.nodeName + ".");
+ if (nodeNodeType === interfaces_1.NodeType.DocumentType &&
+ parentNodeType !== interfaces_1.NodeType.Document)
+ throw new DOMException_1.HierarchyRequestError("A document type node can only be inserted under a document node. Parent node is " + parent.nodeName + ".");
+ /**
+ * 6. If parent is a document, and any of the statements below, switched on
+ * node, are true, throw a "HierarchyRequestError" DOMException.
+ * - DocumentFragment node
+ * If node has more than one element child or has a Text node child.
+ * Otherwise, if node has one element child and either parent has an element
+ * child, child is a doctype, or child is not null and a doctype is
+ * following child.
+ * - element
+ * parent has an element child, child is a doctype, or child is not null and
+ * a doctype is following child.
+ * - doctype
+ * parent has a doctype child, child is non-null and an element is preceding
+ * child, or child is null and parent has an element child.
+ */
+ if (parentNodeType === interfaces_1.NodeType.Document) {
+ if (nodeNodeType === interfaces_1.NodeType.DocumentFragment) {
+ var eleCount = 0;
+ try {
+ for (var _e = __values(node._children), _f = _e.next(); !_f.done; _f = _e.next()) {
+ var childNode = _f.value;
+ if (childNode._nodeType === interfaces_1.NodeType.Element)
+ eleCount++;
+ else if (childNode._nodeType === interfaces_1.NodeType.Text)
+ throw new DOMException_1.HierarchyRequestError("Cannot insert text a node as a child of a document node. Node is " + childNode.nodeName + ".");
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ if (eleCount > 1) {
+ throw new DOMException_1.HierarchyRequestError("A document node can only have one document element node. Document fragment to be inserted has " + eleCount + " element nodes.");
+ }
+ else if (eleCount === 1) {
+ try {
+ for (var _g = __values(parent._children), _h = _g.next(); !_h.done; _h = _g.next()) {
+ var ele = _h.value;
+ if (ele._nodeType === interfaces_1.NodeType.Element)
+ throw new DOMException_1.HierarchyRequestError("The document node already has a document element node.");
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ if (child) {
+ if (childNodeType === interfaces_1.NodeType.DocumentType)
+ throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node.");
+ var doctypeChild = child._nextSibling;
+ while (doctypeChild) {
+ if (doctypeChild._nodeType === interfaces_1.NodeType.DocumentType)
+ throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node.");
+ doctypeChild = doctypeChild._nextSibling;
+ }
+ }
+ }
+ }
+ else if (nodeNodeType === interfaces_1.NodeType.Element) {
+ try {
+ for (var _j = __values(parent._children), _k = _j.next(); !_k.done; _k = _j.next()) {
+ var ele = _k.value;
+ if (ele._nodeType === interfaces_1.NodeType.Element)
+ throw new DOMException_1.HierarchyRequestError("Document already has a document element node. Node is " + node.nodeName + ".");
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (_k && !_k.done && (_c = _j.return)) _c.call(_j);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ if (child) {
+ if (childNodeType === interfaces_1.NodeType.DocumentType)
+ throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node. Node is " + node.nodeName + ".");
+ var doctypeChild = child._nextSibling;
+ while (doctypeChild) {
+ if (doctypeChild._nodeType === interfaces_1.NodeType.DocumentType)
+ throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node. Node is " + node.nodeName + ".");
+ doctypeChild = doctypeChild._nextSibling;
+ }
+ }
+ }
+ else if (nodeNodeType === interfaces_1.NodeType.DocumentType) {
+ try {
+ for (var _l = __values(parent._children), _m = _l.next(); !_m.done; _m = _l.next()) {
+ var ele = _m.value;
+ if (ele._nodeType === interfaces_1.NodeType.DocumentType)
+ throw new DOMException_1.HierarchyRequestError("Document already has a document type node. Node is " + node.nodeName + ".");
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (_m && !_m.done && (_d = _l.return)) _d.call(_l);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+ if (child) {
+ var elementChild = child._previousSibling;
+ while (elementChild) {
+ if (elementChild._nodeType === interfaces_1.NodeType.Element)
+ throw new DOMException_1.HierarchyRequestError("Cannot insert a document type node before an element node. Node is " + node.nodeName + ".");
+ elementChild = elementChild._previousSibling;
+ }
+ }
+ else {
+ var elementChild = parent._firstChild;
+ while (elementChild) {
+ if (elementChild._nodeType === interfaces_1.NodeType.Element)
+ throw new DOMException_1.HierarchyRequestError("Cannot insert a document type node before an element node. Node is " + node.nodeName + ".");
+ elementChild = elementChild._nextSibling;
+ }
+ }
+ }
+ }
+}
+exports.mutation_ensurePreInsertionValidity = mutation_ensurePreInsertionValidity;
+/**
+ * Ensures pre-insertion validity of a node into a parent before a
+ * child, then adopts the node to the tree and inserts it.
+ *
+ * @param node - node to insert
+ * @param parent - parent node to receive node
+ * @param child - child node to insert node before
+ */
+function mutation_preInsert(node, parent, child) {
+ /**
+ * 1. Ensure pre-insertion validity of node into parent before child.
+ * 2. Let reference child be child.
+ * 3. If reference child is node, set it to node’s next sibling.
+ * 4. Adopt node into parent’s node document.
+ * 5. Insert node into parent before reference child.
+ * 6. Return node.
+ */
+ mutation_ensurePreInsertionValidity(node, parent, child);
+ var referenceChild = child;
+ if (referenceChild === node)
+ referenceChild = node._nextSibling;
+ DocumentAlgorithm_1.document_adopt(node, parent._nodeDocument);
+ mutation_insert(node, parent, referenceChild);
+ return node;
+}
+exports.mutation_preInsert = mutation_preInsert;
+/**
+ * Inserts a node into a parent node before the given child node.
+ *
+ * @param node - node to insert
+ * @param parent - parent node to receive node
+ * @param child - child node to insert node before
+ * @param suppressObservers - whether to notify observers
+ */
+function mutation_insert(node, parent, child, suppressObservers) {
+ var e_5, _a;
+ // Optimized common case
+ if (child === null && node._nodeType !== interfaces_1.NodeType.DocumentFragment) {
+ mutation_insert_single(node, parent, suppressObservers);
+ return;
+ }
+ /**
+ * 1. Let count be the number of children of node if it is a
+ * DocumentFragment node, and one otherwise.
+ */
+ var count = (node._nodeType === interfaces_1.NodeType.DocumentFragment ?
+ node._children.size : 1);
+ /**
+ * 2. If child is non-null, then:
+ */
+ if (child !== null) {
+ /**
+ * 2.1. For each live range whose start node is parent and start
+ * offset is greater than child's index, increase its start
+ * offset by count.
+ * 2.2. For each live range whose end node is parent and end
+ * offset is greater than child's index, increase its end
+ * offset by count.
+ */
+ if (DOMImpl_1.dom.rangeList.size !== 0) {
+ var index_1 = TreeAlgorithm_1.tree_index(child);
+ try {
+ for (var _b = __values(DOMImpl_1.dom.rangeList), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var range = _c.value;
+ if (range._start[0] === parent && range._start[1] > index_1) {
+ range._start[1] += count;
+ }
+ if (range._end[0] === parent && range._end[1] > index_1) {
+ range._end[1] += count;
+ }
+ }
+ }
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_5) throw e_5.error; }
+ }
+ }
+ }
+ /**
+ * 3. Let nodes be node’s children, if node is a DocumentFragment node;
+ * otherwise « node ».
+ */
+ var nodes = node._nodeType === interfaces_1.NodeType.DocumentFragment ? new (Array.bind.apply(Array, __spread([void 0], node._children)))() : [node];
+ /**
+ * 4. If node is a DocumentFragment node, remove its children with the
+ * suppress observers flag set.
+ */
+ if (node._nodeType === interfaces_1.NodeType.DocumentFragment) {
+ while (node._firstChild) {
+ mutation_remove(node._firstChild, node, true);
+ }
+ }
+ /**
+ * 5. If node is a DocumentFragment node, then queue a tree mutation record
+ * for node with « », nodes, null, and null.
+ */
+ if (DOMImpl_1.dom.features.mutationObservers) {
+ if (node._nodeType === interfaces_1.NodeType.DocumentFragment) {
+ MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(node, [], nodes, null, null);
+ }
+ }
+ /**
+ * 6. Let previousSibling be child’s previous sibling or parent’s last
+ * child if child is null.
+ */
+ var previousSibling = (child ? child._previousSibling : parent._lastChild);
+ var index = child === null ? -1 : TreeAlgorithm_1.tree_index(child);
+ /**
+ * 7. For each node in nodes, in tree order:
+ */
+ for (var i = 0; i < nodes.length; i++) {
+ var node_1 = nodes[i];
+ if (util_1.Guard.isElementNode(node_1)) {
+ // set document element node
+ if (util_1.Guard.isDocumentNode(parent)) {
+ parent._documentElement = node_1;
+ }
+ // mark that the document has namespaces
+ if (!node_1._nodeDocument._hasNamespaces && (node_1._namespace !== null ||
+ node_1._namespacePrefix !== null)) {
+ node_1._nodeDocument._hasNamespaces = true;
+ }
+ }
+ /**
+ * 7.1. If child is null, then append node to parent’s children.
+ * 7.2. Otherwise, insert node into parent’s children before child’s
+ * index.
+ */
+ node_1._parent = parent;
+ if (child === null) {
+ infra_1.set.append(parent._children, node_1);
+ }
+ else {
+ infra_1.set.insert(parent._children, node_1, index);
+ index++;
+ }
+ // assign siblings and children for quick lookups
+ if (parent._firstChild === null) {
+ node_1._previousSibling = null;
+ node_1._nextSibling = null;
+ parent._firstChild = node_1;
+ parent._lastChild = node_1;
+ }
+ else {
+ var prev = (child ? child._previousSibling : parent._lastChild);
+ var next = (child ? child : null);
+ node_1._previousSibling = prev;
+ node_1._nextSibling = next;
+ if (prev)
+ prev._nextSibling = node_1;
+ if (next)
+ next._previousSibling = node_1;
+ if (!prev)
+ parent._firstChild = node_1;
+ if (!next)
+ parent._lastChild = node_1;
+ }
+ /**
+ * 7.3. If parent is a shadow host and node is a slotable, then
+ * assign a slot for node.
+ */
+ if (DOMImpl_1.dom.features.slots) {
+ if (parent._shadowRoot !== null && util_1.Guard.isSlotable(node_1)) {
+ ShadowTreeAlgorithm_1.shadowTree_assignASlot(node_1);
+ }
+ }
+ /**
+ * 7.4. If node is a Text node, run the child text content change
+ * steps for parent.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ if (util_1.Guard.isTextNode(node_1)) {
+ DOMAlgorithm_1.dom_runChildTextContentChangeSteps(parent);
+ }
+ }
+ /**
+ * 7.5. If parent's root is a shadow root, and parent is a slot
+ * whose assigned nodes is the empty list, then run signal
+ * a slot change for parent.
+ */
+ if (DOMImpl_1.dom.features.slots) {
+ if (util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(parent)) &&
+ util_1.Guard.isSlot(parent) && util_2.isEmpty(parent._assignedNodes)) {
+ ShadowTreeAlgorithm_1.shadowTree_signalASlotChange(parent);
+ }
+ }
+ /**
+ * 7.6. Run assign slotables for a tree with node's root.
+ */
+ if (DOMImpl_1.dom.features.slots) {
+ ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(TreeAlgorithm_1.tree_rootNode(node_1));
+ }
+ /**
+ * 7.7. For each shadow-including inclusive descendant
+ * inclusiveDescendant of node, in shadow-including tree
+ * order:
+ */
+ var inclusiveDescendant = TreeAlgorithm_1.tree_getFirstDescendantNode(node_1, true, true);
+ while (inclusiveDescendant !== null) {
+ /**
+ * 7.7.1. Run the insertion steps with inclusiveDescendant.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ DOMAlgorithm_1.dom_runInsertionSteps(inclusiveDescendant);
+ }
+ if (DOMImpl_1.dom.features.customElements) {
+ /**
+ * 7.7.2. If inclusiveDescendant is connected, then:
+ */
+ if (util_1.Guard.isElementNode(inclusiveDescendant) &&
+ ShadowTreeAlgorithm_1.shadowTree_isConnected(inclusiveDescendant)) {
+ if (util_1.Guard.isCustomElementNode(inclusiveDescendant)) {
+ /**
+ * 7.7.2.1. If inclusiveDescendant is custom, then enqueue a custom
+ * element callback reaction with inclusiveDescendant, callback name
+ * "connectedCallback", and an empty argument list.
+ */
+ CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(inclusiveDescendant, "connectedCallback", []);
+ }
+ else {
+ /**
+ * 7.7.2.2. Otherwise, try to upgrade inclusiveDescendant.
+ */
+ CustomElementAlgorithm_1.customElement_tryToUpgrade(inclusiveDescendant);
+ }
+ }
+ }
+ inclusiveDescendant = TreeAlgorithm_1.tree_getNextDescendantNode(node_1, inclusiveDescendant, true, true);
+ }
+ }
+ /**
+ * 8. If suppress observers flag is unset, then queue a tree mutation record
+ * for parent with nodes, « », previousSibling, and child.
+ */
+ if (DOMImpl_1.dom.features.mutationObservers) {
+ if (!suppressObservers) {
+ MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, nodes, [], previousSibling, child);
+ }
+ }
+}
+exports.mutation_insert = mutation_insert;
+/**
+ * Inserts a node into a parent node. Optimized routine for the common case where
+ * node is not a document fragment node and it has no child nodes.
+ *
+ * @param node - node to insert
+ * @param parent - parent node to receive node
+ * @param suppressObservers - whether to notify observers
+ */
+function mutation_insert_single(node, parent, suppressObservers) {
+ /**
+ * 1. Let count be the number of children of node if it is a
+ * DocumentFragment node, and one otherwise.
+ * 2. If child is non-null, then:
+ * 2.1. For each live range whose start node is parent and start
+ * offset is greater than child's index, increase its start
+ * offset by count.
+ * 2.2. For each live range whose end node is parent and end
+ * offset is greater than child's index, increase its end
+ * offset by count.
+ * 3. Let nodes be node’s children, if node is a DocumentFragment node;
+ * otherwise « node ».
+ * 4. If node is a DocumentFragment node, remove its children with the
+ * suppress observers flag set.
+ * 5. If node is a DocumentFragment node, then queue a tree mutation record
+ * for node with « », nodes, null, and null.
+ */
+ /**
+ * 6. Let previousSibling be child’s previous sibling or parent’s last
+ * child if child is null.
+ */
+ var previousSibling = parent._lastChild;
+ // set document element node
+ if (util_1.Guard.isElementNode(node)) {
+ // set document element node
+ if (util_1.Guard.isDocumentNode(parent)) {
+ parent._documentElement = node;
+ }
+ // mark that the document has namespaces
+ if (!node._nodeDocument._hasNamespaces && (node._namespace !== null ||
+ node._namespacePrefix !== null)) {
+ node._nodeDocument._hasNamespaces = true;
+ }
+ }
+ /**
+ * 7. For each node in nodes, in tree order:
+ * 7.1. If child is null, then append node to parent’s children.
+ * 7.2. Otherwise, insert node into parent’s children before child’s
+ * index.
+ */
+ node._parent = parent;
+ parent._children.add(node);
+ // assign siblings and children for quick lookups
+ if (parent._firstChild === null) {
+ node._previousSibling = null;
+ node._nextSibling = null;
+ parent._firstChild = node;
+ parent._lastChild = node;
+ }
+ else {
+ var prev = parent._lastChild;
+ node._previousSibling = prev;
+ node._nextSibling = null;
+ if (prev)
+ prev._nextSibling = node;
+ if (!prev)
+ parent._firstChild = node;
+ parent._lastChild = node;
+ }
+ /**
+ * 7.3. If parent is a shadow host and node is a slotable, then
+ * assign a slot for node.
+ */
+ if (DOMImpl_1.dom.features.slots) {
+ if (parent._shadowRoot !== null && util_1.Guard.isSlotable(node)) {
+ ShadowTreeAlgorithm_1.shadowTree_assignASlot(node);
+ }
+ }
+ /**
+ * 7.4. If node is a Text node, run the child text content change
+ * steps for parent.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ if (util_1.Guard.isTextNode(node)) {
+ DOMAlgorithm_1.dom_runChildTextContentChangeSteps(parent);
+ }
+ }
+ /**
+ * 7.5. If parent's root is a shadow root, and parent is a slot
+ * whose assigned nodes is the empty list, then run signal
+ * a slot change for parent.
+ */
+ if (DOMImpl_1.dom.features.slots) {
+ if (util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(parent)) &&
+ util_1.Guard.isSlot(parent) && util_2.isEmpty(parent._assignedNodes)) {
+ ShadowTreeAlgorithm_1.shadowTree_signalASlotChange(parent);
+ }
+ }
+ /**
+ * 7.6. Run assign slotables for a tree with node's root.
+ */
+ if (DOMImpl_1.dom.features.slots) {
+ ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(TreeAlgorithm_1.tree_rootNode(node));
+ }
+ /**
+ * 7.7. For each shadow-including inclusive descendant
+ * inclusiveDescendant of node, in shadow-including tree
+ * order:
+ * 7.7.1. Run the insertion steps with inclusiveDescendant.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ DOMAlgorithm_1.dom_runInsertionSteps(node);
+ }
+ if (DOMImpl_1.dom.features.customElements) {
+ /**
+ * 7.7.2. If inclusiveDescendant is connected, then:
+ */
+ if (util_1.Guard.isElementNode(node) &&
+ ShadowTreeAlgorithm_1.shadowTree_isConnected(node)) {
+ if (util_1.Guard.isCustomElementNode(node)) {
+ /**
+ * 7.7.2.1. If inclusiveDescendant is custom, then enqueue a custom
+ * element callback reaction with inclusiveDescendant, callback name
+ * "connectedCallback", and an empty argument list.
+ */
+ CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(node, "connectedCallback", []);
+ }
+ else {
+ /**
+ * 7.7.2.2. Otherwise, try to upgrade inclusiveDescendant.
+ */
+ CustomElementAlgorithm_1.customElement_tryToUpgrade(node);
+ }
+ }
+ }
+ /**
+ * 8. If suppress observers flag is unset, then queue a tree mutation record
+ * for parent with nodes, « », previousSibling, and child.
+ */
+ if (DOMImpl_1.dom.features.mutationObservers) {
+ if (!suppressObservers) {
+ MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, [node], [], previousSibling, null);
+ }
+ }
+}
+/**
+ * Appends a node to the children of a parent node.
+ *
+ * @param node - a node
+ * @param parent - the parent to receive node
+ */
+function mutation_append(node, parent) {
+ /**
+ * To append a node to a parent, pre-insert node into parent before null.
+ */
+ return mutation_preInsert(node, parent, null);
+}
+exports.mutation_append = mutation_append;
+/**
+ * Replaces a node with another node.
+ *
+ * @param child - child node to remove
+ * @param node - node to insert
+ * @param parent - parent node to receive node
+ */
+function mutation_replace(child, node, parent) {
+ var e_6, _a, e_7, _b, e_8, _c, e_9, _d;
+ /**
+ * 1. If parent is not a Document, DocumentFragment, or Element node,
+ * throw a "HierarchyRequestError" DOMException.
+ */
+ if (parent._nodeType !== interfaces_1.NodeType.Document &&
+ parent._nodeType !== interfaces_1.NodeType.DocumentFragment &&
+ parent._nodeType !== interfaces_1.NodeType.Element)
+ throw new DOMException_1.HierarchyRequestError("Only document, document fragment and element nodes can contain child nodes. Parent node is " + parent.nodeName + ".");
+ /**
+ * 2. If node is a host-including inclusive ancestor of parent, throw a
+ * "HierarchyRequestError" DOMException.
+ */
+ if (TreeAlgorithm_1.tree_isHostIncludingAncestorOf(parent, node, true))
+ throw new DOMException_1.HierarchyRequestError("The node to be inserted cannot be an ancestor of parent node. Node is " + node.nodeName + ", parent node is " + parent.nodeName + ".");
+ /**
+ * 3. If child’s parent is not parent, then throw a "NotFoundError"
+ * DOMException.
+ */
+ if (child._parent !== parent)
+ throw new DOMException_1.NotFoundError("The reference child node cannot be found under parent node. Child node is " + child.nodeName + ", parent node is " + parent.nodeName + ".");
+ /**
+ * 4. If node is not a DocumentFragment, DocumentType, Element, Text,
+ * ProcessingInstruction, or Comment node, throw a "HierarchyRequestError"
+ * DOMException.
+ */
+ if (node._nodeType !== interfaces_1.NodeType.DocumentFragment &&
+ node._nodeType !== interfaces_1.NodeType.DocumentType &&
+ node._nodeType !== interfaces_1.NodeType.Element &&
+ node._nodeType !== interfaces_1.NodeType.Text &&
+ node._nodeType !== interfaces_1.NodeType.ProcessingInstruction &&
+ node._nodeType !== interfaces_1.NodeType.CData &&
+ node._nodeType !== interfaces_1.NodeType.Comment)
+ throw new DOMException_1.HierarchyRequestError("Only document fragment, document type, element, text, processing instruction, cdata section or comment nodes can be inserted. Node is " + node.nodeName + ".");
+ /**
+ * 5. If either node is a Text node and parent is a document, or node is a
+ * doctype and parent is not a document, throw a "HierarchyRequestError"
+ * DOMException.
+ */
+ if (node._nodeType === interfaces_1.NodeType.Text &&
+ parent._nodeType === interfaces_1.NodeType.Document)
+ throw new DOMException_1.HierarchyRequestError("Cannot insert a text node as a child of a document node. Node is " + node.nodeName + ".");
+ if (node._nodeType === interfaces_1.NodeType.DocumentType &&
+ parent._nodeType !== interfaces_1.NodeType.Document)
+ throw new DOMException_1.HierarchyRequestError("A document type node can only be inserted under a document node. Parent node is " + parent.nodeName + ".");
+ /**
+ * 6. If parent is a document, and any of the statements below, switched on
+ * node, are true, throw a "HierarchyRequestError" DOMException.
+ * - DocumentFragment node
+ * If node has more than one element child or has a Text node child.
+ * Otherwise, if node has one element child and either parent has an element
+ * child that is not child or a doctype is following child.
+ * - element
+ * parent has an element child that is not child or a doctype is
+ * following child.
+ * - doctype
+ * parent has a doctype child that is not child, or an element is
+ * preceding child.
+ */
+ if (parent._nodeType === interfaces_1.NodeType.Document) {
+ if (node._nodeType === interfaces_1.NodeType.DocumentFragment) {
+ var eleCount = 0;
+ try {
+ for (var _e = __values(node._children), _f = _e.next(); !_f.done; _f = _e.next()) {
+ var childNode = _f.value;
+ if (childNode._nodeType === interfaces_1.NodeType.Element)
+ eleCount++;
+ else if (childNode._nodeType === interfaces_1.NodeType.Text)
+ throw new DOMException_1.HierarchyRequestError("Cannot insert text a node as a child of a document node. Node is " + childNode.nodeName + ".");
+ }
+ }
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
+ finally {
+ try {
+ if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
+ }
+ finally { if (e_6) throw e_6.error; }
+ }
+ if (eleCount > 1) {
+ throw new DOMException_1.HierarchyRequestError("A document node can only have one document element node. Document fragment to be inserted has " + eleCount + " element nodes.");
+ }
+ else if (eleCount === 1) {
+ try {
+ for (var _g = __values(parent._children), _h = _g.next(); !_h.done; _h = _g.next()) {
+ var ele = _h.value;
+ if (ele._nodeType === interfaces_1.NodeType.Element && ele !== child)
+ throw new DOMException_1.HierarchyRequestError("The document node already has a document element node.");
+ }
+ }
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
+ finally {
+ try {
+ if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
+ }
+ finally { if (e_7) throw e_7.error; }
+ }
+ var doctypeChild = child._nextSibling;
+ while (doctypeChild) {
+ if (doctypeChild._nodeType === interfaces_1.NodeType.DocumentType)
+ throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node.");
+ doctypeChild = doctypeChild._nextSibling;
+ }
+ }
+ }
+ else if (node._nodeType === interfaces_1.NodeType.Element) {
+ try {
+ for (var _j = __values(parent._children), _k = _j.next(); !_k.done; _k = _j.next()) {
+ var ele = _k.value;
+ if (ele._nodeType === interfaces_1.NodeType.Element && ele !== child)
+ throw new DOMException_1.HierarchyRequestError("Document already has a document element node. Node is " + node.nodeName + ".");
+ }
+ }
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
+ finally {
+ try {
+ if (_k && !_k.done && (_c = _j.return)) _c.call(_j);
+ }
+ finally { if (e_8) throw e_8.error; }
+ }
+ var doctypeChild = child._nextSibling;
+ while (doctypeChild) {
+ if (doctypeChild._nodeType === interfaces_1.NodeType.DocumentType)
+ throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node. Node is " + node.nodeName + ".");
+ doctypeChild = doctypeChild._nextSibling;
+ }
+ }
+ else if (node._nodeType === interfaces_1.NodeType.DocumentType) {
+ try {
+ for (var _l = __values(parent._children), _m = _l.next(); !_m.done; _m = _l.next()) {
+ var ele = _m.value;
+ if (ele._nodeType === interfaces_1.NodeType.DocumentType && ele !== child)
+ throw new DOMException_1.HierarchyRequestError("Document already has a document type node. Node is " + node.nodeName + ".");
+ }
+ }
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
+ finally {
+ try {
+ if (_m && !_m.done && (_d = _l.return)) _d.call(_l);
+ }
+ finally { if (e_9) throw e_9.error; }
+ }
+ var elementChild = child._previousSibling;
+ while (elementChild) {
+ if (elementChild._nodeType === interfaces_1.NodeType.Element)
+ throw new DOMException_1.HierarchyRequestError("Cannot insert a document type node before an element node. Node is " + node.nodeName + ".");
+ elementChild = elementChild._previousSibling;
+ }
+ }
+ }
+ /**
+ * 7. Let reference child be child’s next sibling.
+ * 8. If reference child is node, set it to node’s next sibling.
+ * 8. Let previousSibling be child’s previous sibling.
+ */
+ var referenceChild = child._nextSibling;
+ if (referenceChild === node)
+ referenceChild = node._nextSibling;
+ var previousSibling = child._previousSibling;
+ /**
+ * 10. Adopt node into parent’s node document.
+ * 11. Let removedNodes be the empty list.
+ */
+ DocumentAlgorithm_1.document_adopt(node, parent._nodeDocument);
+ var removedNodes = [];
+ /**
+ * 12. If child’s parent is not null, then:
+ */
+ if (child._parent !== null) {
+ /**
+ * 12.1. Set removedNodes to [child].
+ * 12.2. Remove child from its parent with the suppress observers flag
+ * set.
+ */
+ removedNodes.push(child);
+ mutation_remove(child, child._parent, true);
+ }
+ /**
+ * 13. Let nodes be node’s children if node is a DocumentFragment node;
+ * otherwise [node].
+ */
+ var nodes = [];
+ if (node._nodeType === interfaces_1.NodeType.DocumentFragment) {
+ nodes = Array.from(node._children);
+ }
+ else {
+ nodes.push(node);
+ }
+ /**
+ * 14. Insert node into parent before reference child with the suppress
+ * observers flag set.
+ */
+ mutation_insert(node, parent, referenceChild, true);
+ /**
+ * 15. Queue a tree mutation record for parent with nodes, removedNodes,
+ * previousSibling, and reference child.
+ */
+ if (DOMImpl_1.dom.features.mutationObservers) {
+ MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, nodes, removedNodes, previousSibling, referenceChild);
+ }
+ /**
+ * 16. Return child.
+ */
+ return child;
+}
+exports.mutation_replace = mutation_replace;
+/**
+ * Replaces all nodes of a parent with the given node.
+ *
+ * @param node - node to insert
+ * @param parent - parent node to receive node
+ */
+function mutation_replaceAll(node, parent) {
+ var e_10, _a;
+ /**
+ * 1. If node is not null, adopt node into parent’s node document.
+ */
+ if (node !== null) {
+ DocumentAlgorithm_1.document_adopt(node, parent._nodeDocument);
+ }
+ /**
+ * 2. Let removedNodes be parent’s children.
+ */
+ var removedNodes = Array.from(parent._children);
+ /**
+ * 3. Let addedNodes be the empty list.
+ * 4. If node is DocumentFragment node, then set addedNodes to node’s
+ * children.
+ * 5. Otherwise, if node is non-null, set addedNodes to [node].
+ */
+ var addedNodes = [];
+ if (node && node._nodeType === interfaces_1.NodeType.DocumentFragment) {
+ addedNodes = Array.from(node._children);
+ }
+ else if (node !== null) {
+ addedNodes.push(node);
+ }
+ try {
+ /**
+ * 6. Remove all parent’s children, in tree order, with the suppress
+ * observers flag set.
+ */
+ for (var removedNodes_1 = __values(removedNodes), removedNodes_1_1 = removedNodes_1.next(); !removedNodes_1_1.done; removedNodes_1_1 = removedNodes_1.next()) {
+ var childNode = removedNodes_1_1.value;
+ mutation_remove(childNode, parent, true);
+ }
+ }
+ catch (e_10_1) { e_10 = { error: e_10_1 }; }
+ finally {
+ try {
+ if (removedNodes_1_1 && !removedNodes_1_1.done && (_a = removedNodes_1.return)) _a.call(removedNodes_1);
+ }
+ finally { if (e_10) throw e_10.error; }
+ }
+ /**
+ * 7. If node is not null, then insert node into parent before null with the
+ * suppress observers flag set.
+ */
+ if (node !== null) {
+ mutation_insert(node, parent, null, true);
+ }
+ /**
+ * 8. Queue a tree mutation record for parent with addedNodes, removedNodes,
+ * null, and null.
+ */
+ if (DOMImpl_1.dom.features.mutationObservers) {
+ MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, addedNodes, removedNodes, null, null);
+ }
+}
+exports.mutation_replaceAll = mutation_replaceAll;
+/**
+ * Ensures pre-removal validity of a child node from a parent, then
+ * removes it.
+ *
+ * @param child - child node to remove
+ * @param parent - parent node
+ */
+function mutation_preRemove(child, parent) {
+ /**
+ * 1. If child’s parent is not parent, then throw a "NotFoundError"
+ * DOMException.
+ * 2. Remove child from parent.
+ * 3. Return child.
+ */
+ if (child._parent !== parent)
+ throw new DOMException_1.NotFoundError("The child node cannot be found under parent node. Child node is " + child.nodeName + ", parent node is " + parent.nodeName + ".");
+ mutation_remove(child, parent);
+ return child;
+}
+exports.mutation_preRemove = mutation_preRemove;
+/**
+ * Removes a child node from its parent.
+ *
+ * @param node - node to remove
+ * @param parent - parent node
+ * @param suppressObservers - whether to notify observers
+ */
+function mutation_remove(node, parent, suppressObservers) {
+ var e_11, _a, e_12, _b, e_13, _c, e_14, _d;
+ if (DOMImpl_1.dom.rangeList.size !== 0) {
+ /**
+ * 1. Let index be node’s index.
+ */
+ var index = TreeAlgorithm_1.tree_index(node);
+ try {
+ /**
+ * 2. For each live range whose start node is an inclusive descendant of
+ * node, set its start to (parent, index).
+ * 3. For each live range whose end node is an inclusive descendant of
+ * node, set its end to (parent, index).
+ */
+ for (var _e = __values(DOMImpl_1.dom.rangeList), _f = _e.next(); !_f.done; _f = _e.next()) {
+ var range = _f.value;
+ if (TreeAlgorithm_1.tree_isDescendantOf(node, range._start[0], true)) {
+ range._start = [parent, index];
+ }
+ if (TreeAlgorithm_1.tree_isDescendantOf(node, range._end[0], true)) {
+ range._end = [parent, index];
+ }
+ if (range._start[0] === parent && range._start[1] > index) {
+ range._start[1]--;
+ }
+ if (range._end[0] === parent && range._end[1] > index) {
+ range._end[1]--;
+ }
+ }
+ }
+ catch (e_11_1) { e_11 = { error: e_11_1 }; }
+ finally {
+ try {
+ if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
+ }
+ finally { if (e_11) throw e_11.error; }
+ }
+ try {
+ /**
+ * 4. For each live range whose start node is parent and start offset is
+ * greater than index, decrease its start offset by 1.
+ * 5. For each live range whose end node is parent and end offset is greater
+ * than index, decrease its end offset by 1.
+ */
+ for (var _g = __values(DOMImpl_1.dom.rangeList), _h = _g.next(); !_h.done; _h = _g.next()) {
+ var range = _h.value;
+ if (range._start[0] === parent && range._start[1] > index) {
+ range._start[1] -= 1;
+ }
+ if (range._end[0] === parent && range._end[1] > index) {
+ range._end[1] -= 1;
+ }
+ }
+ }
+ catch (e_12_1) { e_12 = { error: e_12_1 }; }
+ finally {
+ try {
+ if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
+ }
+ finally { if (e_12) throw e_12.error; }
+ }
+ }
+ /**
+ * 6. For each NodeIterator object iterator whose root’s node document is
+ * node’s node document, run the NodeIterator pre-removing steps given node
+ * and iterator.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ try {
+ for (var _j = __values(NodeIteratorAlgorithm_1.nodeIterator_iteratorList()), _k = _j.next(); !_k.done; _k = _j.next()) {
+ var iterator = _k.value;
+ if (iterator._root._nodeDocument === node._nodeDocument) {
+ DOMAlgorithm_1.dom_runNodeIteratorPreRemovingSteps(iterator, node);
+ }
+ }
+ }
+ catch (e_13_1) { e_13 = { error: e_13_1 }; }
+ finally {
+ try {
+ if (_k && !_k.done && (_c = _j.return)) _c.call(_j);
+ }
+ finally { if (e_13) throw e_13.error; }
+ }
+ }
+ /**
+ * 7. Let oldPreviousSibling be node’s previous sibling.
+ * 8. Let oldNextSibling be node’s next sibling.
+ */
+ var oldPreviousSibling = node._previousSibling;
+ var oldNextSibling = node._nextSibling;
+ // set document element node
+ if (util_1.Guard.isDocumentNode(parent) && util_1.Guard.isElementNode(node)) {
+ parent._documentElement = null;
+ }
+ /**
+ * 9. Remove node from its parent’s children.
+ */
+ node._parent = null;
+ parent._children.delete(node);
+ // assign siblings and children for quick lookups
+ var prev = node._previousSibling;
+ var next = node._nextSibling;
+ node._previousSibling = null;
+ node._nextSibling = null;
+ if (prev)
+ prev._nextSibling = next;
+ if (next)
+ next._previousSibling = prev;
+ if (!prev)
+ parent._firstChild = next;
+ if (!next)
+ parent._lastChild = prev;
+ /**
+ * 10. If node is assigned, then run assign slotables for node’s assigned
+ * slot.
+ */
+ if (DOMImpl_1.dom.features.slots) {
+ if (util_1.Guard.isSlotable(node) && node._assignedSlot !== null && ShadowTreeAlgorithm_1.shadowTree_isAssigned(node)) {
+ ShadowTreeAlgorithm_1.shadowTree_assignSlotables(node._assignedSlot);
+ }
+ }
+ /**
+ * 11. If parent’s root is a shadow root, and parent is a slot whose
+ * assigned nodes is the empty list, then run signal a slot change for
+ * parent.
+ */
+ if (DOMImpl_1.dom.features.slots) {
+ if (util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(parent)) &&
+ util_1.Guard.isSlot(parent) && util_2.isEmpty(parent._assignedNodes)) {
+ ShadowTreeAlgorithm_1.shadowTree_signalASlotChange(parent);
+ }
+ }
+ /**
+ * 12. If node has an inclusive descendant that is a slot, then:
+ * 12.1. Run assign slotables for a tree with parent's root.
+ * 12.2. Run assign slotables for a tree with node.
+ */
+ if (DOMImpl_1.dom.features.slots) {
+ var descendant_1 = TreeAlgorithm_1.tree_getFirstDescendantNode(node, true, false, function (e) { return util_1.Guard.isSlot(e); });
+ if (descendant_1 !== null) {
+ ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(TreeAlgorithm_1.tree_rootNode(parent));
+ ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(node);
+ }
+ }
+ /**
+ * 13. Run the removing steps with node and parent.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ DOMAlgorithm_1.dom_runRemovingSteps(node, parent);
+ }
+ /**
+ * 14. If node is custom, then enqueue a custom element callback
+ * reaction with node, callback name "disconnectedCallback",
+ * and an empty argument list.
+ */
+ if (DOMImpl_1.dom.features.customElements) {
+ if (util_1.Guard.isCustomElementNode(node)) {
+ CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(node, "disconnectedCallback", []);
+ }
+ }
+ /**
+ * 15. For each shadow-including descendant descendant of node,
+ * in shadow-including tree order, then:
+ */
+ var descendant = TreeAlgorithm_1.tree_getFirstDescendantNode(node, false, true);
+ while (descendant !== null) {
+ /**
+ * 15.1. Run the removing steps with descendant.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ DOMAlgorithm_1.dom_runRemovingSteps(descendant, node);
+ }
+ /**
+ * 15.2. If descendant is custom, then enqueue a custom element
+ * callback reaction with descendant, callback name
+ * "disconnectedCallback", and an empty argument list.
+ */
+ if (DOMImpl_1.dom.features.customElements) {
+ if (util_1.Guard.isCustomElementNode(descendant)) {
+ CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(descendant, "disconnectedCallback", []);
+ }
+ }
+ descendant = TreeAlgorithm_1.tree_getNextDescendantNode(node, descendant, false, true);
+ }
+ /**
+ * 16. For each inclusive ancestor inclusiveAncestor of parent, and
+ * then for each registered of inclusiveAncestor's registered
+ * observer list, if registered's options's subtree is true,
+ * then append a new transient registered observer whose
+ * observer is registered's observer, options is registered's
+ * options, and source is registered to node's registered
+ * observer list.
+ */
+ if (DOMImpl_1.dom.features.mutationObservers) {
+ var inclusiveAncestor = TreeAlgorithm_1.tree_getFirstAncestorNode(parent, true);
+ while (inclusiveAncestor !== null) {
+ try {
+ for (var _l = (e_14 = void 0, __values(inclusiveAncestor._registeredObserverList)), _m = _l.next(); !_m.done; _m = _l.next()) {
+ var registered = _m.value;
+ if (registered.options.subtree) {
+ node._registeredObserverList.push({
+ observer: registered.observer,
+ options: registered.options,
+ source: registered
+ });
+ }
+ }
+ }
+ catch (e_14_1) { e_14 = { error: e_14_1 }; }
+ finally {
+ try {
+ if (_m && !_m.done && (_d = _l.return)) _d.call(_l);
+ }
+ finally { if (e_14) throw e_14.error; }
+ }
+ inclusiveAncestor = TreeAlgorithm_1.tree_getNextAncestorNode(parent, inclusiveAncestor, true);
+ }
+ }
+ /**
+ * 17. If suppress observers flag is unset, then queue a tree mutation
+ * record for parent with « », « node », oldPreviousSibling, and
+ * oldNextSibling.
+ */
+ if (DOMImpl_1.dom.features.mutationObservers) {
+ if (!suppressObservers) {
+ MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, [], [node], oldPreviousSibling, oldNextSibling);
+ }
+ }
+ /**
+ * 18. If node is a Text node, then run the child text content change steps
+ * for parent.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ if (util_1.Guard.isTextNode(node)) {
+ DOMAlgorithm_1.dom_runChildTextContentChangeSteps(parent);
+ }
+ }
+}
+exports.mutation_remove = mutation_remove;
+//# sourceMappingURL=MutationAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js.map
new file mode 100644
index 0000000..6f494ea
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.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,4BAAE;oBAA/D,IAAM,UAAU,WAAA;oBACnB,IAAI,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE;wBAC9B,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC;4BAChC,QAAQ,EAAE,UAAU,CAAC,QAAQ;4BAC7B,OAAO,EAAE,UAAU,CAAC,OAAO;4BAC3B,MAAM,EAAE,UAAU;yBACnB,CAAC,CAAA;qBACH;iBACF;;;;;;;;;YACD,iBAAiB,GAAG,wCAAwB,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAA;SAC9E;KACF;IAED;;;;OAIG;IACH,IAAI,aAAG,CAAC,QAAQ,CAAC,iBAAiB,EAAE;QAClC,IAAI,CAAC,iBAAiB,EAAE;YACtB,4DAAgC,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,EACjD,kBAAkB,EAAE,cAAc,CAAC,CAAA;SACtC;KACF;IAED;;;OAGG;IACH,IAAI,aAAG,CAAC,QAAQ,CAAC,KAAK,EAAE;QACtB,IAAI,YAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YAC1B,iDAAkC,CAAC,MAAM,CAAC,CAAA;SAC3C;KACF;AACH,CAAC;AAzND,0CAyNC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.d.ts
new file mode 100644
index 0000000..3104944
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.d.ts
@@ -0,0 +1,43 @@
+import { Node } from "../dom/interfaces";
+/**
+ * Queues a mutation observer microtask to the surrounding agent’s mutation
+ * observers.
+ */
+export declare function observer_queueAMutationObserverMicrotask(): void;
+/**
+ * Notifies the surrounding agent’s mutation observers.
+ */
+export declare function observer_notifyMutationObservers(): void;
+/**
+ * Queues a mutation record of the given type for target.
+ *
+ * @param type - mutation record type
+ * @param target - target node
+ * @param name - name before mutation
+ * @param namespace - namespace before mutation
+ * @param oldValue - attribute value before mutation
+ * @param addedNodes - a list od added nodes
+ * @param removedNodes - a list of removed nodes
+ * @param previousSibling - previous sibling of target before mutation
+ * @param nextSibling - next sibling of target before mutation
+ */
+export declare function observer_queueMutationRecord(type: "attributes" | "characterData" | "childList", target: Node, name: string | null, namespace: string | null, oldValue: string | null, addedNodes: Node[], removedNodes: Node[], previousSibling: Node | null, nextSibling: Node | null): void;
+/**
+ * Queues a tree mutation record for target.
+ *
+ * @param target - target node
+ * @param addedNodes - a list od added nodes
+ * @param removedNodes - a list of removed nodes
+ * @param previousSibling - previous sibling of target before mutation
+ * @param nextSibling - next sibling of target before mutation
+ */
+export declare function observer_queueTreeMutationRecord(target: Node, addedNodes: Node[], removedNodes: Node[], previousSibling: Node | null, nextSibling: Node | null): void;
+/**
+ * Queues an attribute mutation record for target.
+ *
+ * @param target - target node
+ * @param name - name before mutation
+ * @param namespace - namespace before mutation
+ * @param oldValue - attribute value before mutation
+ */
+export declare function observer_queueAttributeMutationRecord(target: Node, name: string | null, namespace: string | null, oldValue: string | null): void;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js
new file mode 100644
index 0000000..99314a3
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js
@@ -0,0 +1,276 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("../dom/DOMImpl");
+var util_1 = require("../util");
+var infra_1 = require("@oozcitak/infra");
+var CreateAlgorithm_1 = require("./CreateAlgorithm");
+var TreeAlgorithm_1 = require("./TreeAlgorithm");
+var EventAlgorithm_1 = require("./EventAlgorithm");
+/**
+ * Queues a mutation observer microtask to the surrounding agent’s mutation
+ * observers.
+ */
+function observer_queueAMutationObserverMicrotask() {
+ /**
+ * 1. If the surrounding agent’s mutation observer microtask queued is true,
+ * then return.
+ * 2. Set the surrounding agent’s mutation observer microtask queued to true.
+ * 3. Queue a microtask to notify mutation observers.
+ */
+ var window = DOMImpl_1.dom.window;
+ if (window._mutationObserverMicrotaskQueued)
+ return;
+ window._mutationObserverMicrotaskQueued = true;
+ Promise.resolve().then(function () { observer_notifyMutationObservers(); });
+}
+exports.observer_queueAMutationObserverMicrotask = observer_queueAMutationObserverMicrotask;
+/**
+ * Notifies the surrounding agent’s mutation observers.
+ */
+function observer_notifyMutationObservers() {
+ var e_1, _a, e_2, _b;
+ /**
+ * 1. Set the surrounding agent’s mutation observer microtask queued to false.
+ * 2. Let notifySet be a clone of the surrounding agent’s mutation observers.
+ * 3. Let signalSet be a clone of the surrounding agent’s signal slots.
+ * 4. Empty the surrounding agent’s signal slots.
+ */
+ var window = DOMImpl_1.dom.window;
+ window._mutationObserverMicrotaskQueued = false;
+ var notifySet = infra_1.set.clone(window._mutationObservers);
+ var signalSet = infra_1.set.clone(window._signalSlots);
+ infra_1.set.empty(window._signalSlots);
+ var _loop_1 = function (mo) {
+ /**
+ * 5.1. Let records be a clone of mo’s record queue.
+ * 5.2. Empty mo’s record queue.
+ */
+ var records = infra_1.list.clone(mo._recordQueue);
+ infra_1.list.empty(mo._recordQueue);
+ /**
+ * 5.3. For each node of mo’s node list, remove all transient registered
+ * observers whose observer is mo from node’s registered observer list.
+ */
+ for (var i = 0; i < mo._nodeList.length; i++) {
+ var node = mo._nodeList[i];
+ infra_1.list.remove(node._registeredObserverList, function (observer) {
+ return util_1.Guard.isTransientRegisteredObserver(observer) && observer.observer === mo;
+ });
+ }
+ /**
+ * 5.4. If records is not empty, then invoke mo’s callback with « records,
+ * mo », and mo. If this throws an exception, then report the exception.
+ */
+ if (!infra_1.list.isEmpty(records)) {
+ try {
+ mo._callback.call(mo, records, mo);
+ }
+ catch (err) {
+ // TODO: Report the exception
+ }
+ }
+ };
+ try {
+ /**
+ * 5. For each mo of notifySet:
+ */
+ for (var notifySet_1 = __values(notifySet), notifySet_1_1 = notifySet_1.next(); !notifySet_1_1.done; notifySet_1_1 = notifySet_1.next()) {
+ var mo = notifySet_1_1.value;
+ _loop_1(mo);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (notifySet_1_1 && !notifySet_1_1.done && (_a = notifySet_1.return)) _a.call(notifySet_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ /**
+ * 6. For each slot of signalSet, fire an event named slotchange, with its
+ * bubbles attribute set to true, at slot.
+ */
+ if (DOMImpl_1.dom.features.slots) {
+ try {
+ for (var signalSet_1 = __values(signalSet), signalSet_1_1 = signalSet_1.next(); !signalSet_1_1.done; signalSet_1_1 = signalSet_1.next()) {
+ var slot = signalSet_1_1.value;
+ EventAlgorithm_1.event_fireAnEvent("slotchange", slot, undefined, { bubbles: true });
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (signalSet_1_1 && !signalSet_1_1.done && (_b = signalSet_1.return)) _b.call(signalSet_1);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ }
+}
+exports.observer_notifyMutationObservers = observer_notifyMutationObservers;
+/**
+ * Queues a mutation record of the given type for target.
+ *
+ * @param type - mutation record type
+ * @param target - target node
+ * @param name - name before mutation
+ * @param namespace - namespace before mutation
+ * @param oldValue - attribute value before mutation
+ * @param addedNodes - a list od added nodes
+ * @param removedNodes - a list of removed nodes
+ * @param previousSibling - previous sibling of target before mutation
+ * @param nextSibling - next sibling of target before mutation
+ */
+function observer_queueMutationRecord(type, target, name, namespace, oldValue, addedNodes, removedNodes, previousSibling, nextSibling) {
+ var e_3, _a;
+ /**
+ * 1. Let interestedObservers be an empty map.
+ * 2. Let nodes be the inclusive ancestors of target.
+ * 3. For each node in nodes, and then for each registered of node’s
+ * registered observer list:
+ */
+ var interestedObservers = new Map();
+ var node = TreeAlgorithm_1.tree_getFirstAncestorNode(target, true);
+ while (node !== null) {
+ for (var i = 0; i < node._registeredObserverList.length; i++) {
+ var registered = node._registeredObserverList[i];
+ /**
+ * 3.1. Let options be registered’s options.
+ * 3.2. If none of the following are true
+ * - node is not target and options’s subtree is false
+ * - type is "attributes" and options’s attributes is not true
+ * - type is "attributes", options’s attributeFilter is present, and
+ * options’s attributeFilter does not contain name or namespace is
+ * non-null
+ * - type is "characterData" and options’s characterData is not true
+ * - type is "childList" and options’s childList is false
+ */
+ var options = registered.options;
+ if (node !== target && !options.subtree)
+ continue;
+ if (type === "attributes" && !options.attributes)
+ continue;
+ if (type === "attributes" && options.attributeFilter &&
+ (!options.attributeFilter.indexOf(name || '') || namespace !== null))
+ continue;
+ if (type === "characterData" && !options.characterData)
+ continue;
+ if (type === "childList" && !options.childList)
+ continue;
+ /**
+ * then:
+ * 3.2.1. Let mo be registered’s observer.
+ * 3.2.2. If interestedObservers[mo] does not exist, then set
+ * interestedObservers[mo] to null.
+ * 3.2.3. If either type is "attributes" and options’s attributeOldValue
+ * is true, or type is "characterData" and options’s
+ * characterDataOldValue is true, then set interestedObservers[mo]
+ * to oldValue.
+ */
+ var mo = registered.observer;
+ if (!interestedObservers.has(mo)) {
+ interestedObservers.set(mo, null);
+ }
+ if ((type === "attributes" && options.attributeOldValue) ||
+ (type === "characterData" && options.characterDataOldValue)) {
+ interestedObservers.set(mo, oldValue);
+ }
+ }
+ node = TreeAlgorithm_1.tree_getNextAncestorNode(target, node, true);
+ }
+ try {
+ /**
+ * 4. For each observer → mappedOldValue of interestedObservers:
+ */
+ for (var interestedObservers_1 = __values(interestedObservers), interestedObservers_1_1 = interestedObservers_1.next(); !interestedObservers_1_1.done; interestedObservers_1_1 = interestedObservers_1.next()) {
+ var _b = __read(interestedObservers_1_1.value, 2), observer = _b[0], mappedOldValue = _b[1];
+ /**
+ * 4.1. Let record be a new MutationRecord object with its type set to
+ * type, target set to target, attributeName set to name,
+ * attributeNamespace set to namespace, oldValue set to mappedOldValue,
+ * addedNodes set to addedNodes, removedNodes set to removedNodes,
+ * previousSibling set to previousSibling, and nextSibling set to
+ * nextSibling.
+ * 4.2. Enqueue record to observer’s record queue.
+ */
+ var record = CreateAlgorithm_1.create_mutationRecord(type, target, CreateAlgorithm_1.create_nodeListStatic(target, addedNodes), CreateAlgorithm_1.create_nodeListStatic(target, removedNodes), previousSibling, nextSibling, name, namespace, mappedOldValue);
+ var queue = observer._recordQueue;
+ queue.push(record);
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (interestedObservers_1_1 && !interestedObservers_1_1.done && (_a = interestedObservers_1.return)) _a.call(interestedObservers_1);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ /**
+ * 5. Queue a mutation observer microtask.
+ */
+ observer_queueAMutationObserverMicrotask();
+}
+exports.observer_queueMutationRecord = observer_queueMutationRecord;
+/**
+ * Queues a tree mutation record for target.
+ *
+ * @param target - target node
+ * @param addedNodes - a list od added nodes
+ * @param removedNodes - a list of removed nodes
+ * @param previousSibling - previous sibling of target before mutation
+ * @param nextSibling - next sibling of target before mutation
+ */
+function observer_queueTreeMutationRecord(target, addedNodes, removedNodes, previousSibling, nextSibling) {
+ /**
+ * To queue a tree mutation record for target with addedNodes, removedNodes,
+ * previousSibling, and nextSibling, queue a mutation record of "childList"
+ * for target with null, null, null, addedNodes, removedNodes,
+ * previousSibling, and nextSibling.
+ */
+ observer_queueMutationRecord("childList", target, null, null, null, addedNodes, removedNodes, previousSibling, nextSibling);
+}
+exports.observer_queueTreeMutationRecord = observer_queueTreeMutationRecord;
+/**
+ * Queues an attribute mutation record for target.
+ *
+ * @param target - target node
+ * @param name - name before mutation
+ * @param namespace - namespace before mutation
+ * @param oldValue - attribute value before mutation
+ */
+function observer_queueAttributeMutationRecord(target, name, namespace, oldValue) {
+ /**
+ * To queue an attribute mutation record for target with name, namespace,
+ * and oldValue, queue a mutation record of "attributes" for target with
+ * name, namespace, oldValue, « », « », null, and null.
+ */
+ observer_queueMutationRecord("attributes", target, name, namespace, oldValue, [], [], null, null);
+}
+exports.observer_queueAttributeMutationRecord = observer_queueAttributeMutationRecord;
+//# sourceMappingURL=MutationObserverAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js.map
new file mode 100644
index 0000000..4440b69
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"MutationObserverAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/MutationObserverAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAoC;AAEpC,gCAA+B;AAC/B,yCAAoE;AACpE,qDAAgF;AAChF,iDAAqF;AACrF,mDAAoD;AAEpD;;;GAGG;AACH,SAAgB,wCAAwC;IACtD;;;;;OAKG;IACH,IAAM,MAAM,GAAG,aAAG,CAAC,MAAM,CAAA;IAEzB,IAAI,MAAM,CAAC,gCAAgC;QAAE,OAAM;IACnD,MAAM,CAAC,gCAAgC,GAAG,IAAI,CAAA;IAC9C,OAAO,CAAC,OAAO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;;;;;;;;;IAED;;OAEG;IACH,wCAAwC,EAAE,CAAA;AAC5C,CAAC;AArFD,oEAqFC;AAED;;;;;;;;GAQG;AACH,SAAgB,gCAAgC,CAAC,MAAY,EAC3D,UAAkB,EAAE,YAAoB,EACxC,eAA4B,EAAE,WAAwB;IACtD;;;;;OAKG;IACH,4BAA4B,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAChE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,CAAC,CAAA;AAC3D,CAAC;AAXD,4EAWC;AAED;;;;;;;GAOG;AACH,SAAgB,qCAAqC,CAAC,MAAY,EAAE,IAAmB,EACrF,SAAwB,EAAE,QAAuB;IACjD;;;;OAIG;IACH,4BAA4B,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAChE,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACjC,CAAC;AATD,sFASC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.d.ts
new file mode 100644
index 0000000..19a455b
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.d.ts
@@ -0,0 +1,25 @@
+/**
+ * Validates the given qualified name.
+ *
+ * @param qualifiedName - qualified name
+ */
+export declare function namespace_validate(qualifiedName: string): void;
+/**
+ * Validates and extracts a namespace, prefix and localName from the
+ * given namespace and qualified name.
+ * See: https://dom.spec.whatwg.org/#validate-and-extract.
+ *
+ * @param namespace - namespace
+ * @param qualifiedName - qualified name
+ *
+ * @returns a tuple with `namespace`, `prefix` and `localName`.
+ */
+export declare function namespace_validateAndExtract(namespace: string | null, qualifiedName: string): [string | null, string | null, string];
+/**
+ * Extracts a prefix and localName from the given qualified name.
+ *
+ * @param qualifiedName - qualified name
+ *
+ * @returns an tuple with `prefix` and `localName`.
+ */
+export declare function namespace_extractQName(qualifiedName: string): [string | null, string];
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js
new file mode 100644
index 0000000..793b923
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js
@@ -0,0 +1,85 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMException_1 = require("../dom/DOMException");
+var infra_1 = require("@oozcitak/infra");
+var XMLAlgorithm_1 = require("./XMLAlgorithm");
+/**
+ * Validates the given qualified name.
+ *
+ * @param qualifiedName - qualified name
+ */
+function namespace_validate(qualifiedName) {
+ /**
+ * To validate a qualifiedName, throw an "InvalidCharacterError"
+ * DOMException if qualifiedName does not match the Name or QName
+ * production.
+ */
+ if (!XMLAlgorithm_1.xml_isName(qualifiedName))
+ throw new DOMException_1.InvalidCharacterError("Invalid XML name: " + qualifiedName);
+ if (!XMLAlgorithm_1.xml_isQName(qualifiedName))
+ throw new DOMException_1.InvalidCharacterError("Invalid XML qualified name: " + qualifiedName + ".");
+}
+exports.namespace_validate = namespace_validate;
+/**
+ * Validates and extracts a namespace, prefix and localName from the
+ * given namespace and qualified name.
+ * See: https://dom.spec.whatwg.org/#validate-and-extract.
+ *
+ * @param namespace - namespace
+ * @param qualifiedName - qualified name
+ *
+ * @returns a tuple with `namespace`, `prefix` and `localName`.
+ */
+function namespace_validateAndExtract(namespace, qualifiedName) {
+ /**
+ * 1. If namespace is the empty string, set it to null.
+ * 2. Validate qualifiedName.
+ * 3. Let prefix be null.
+ * 4. Let localName be qualifiedName.
+ * 5. If qualifiedName contains a ":" (U+003E), then split the string on it
+ * and set prefix to the part before and localName to the part after.
+ * 6. If prefix is non-null and namespace is null, then throw a
+ * "NamespaceError" DOMException.
+ * 7. If prefix is "xml" and namespace is not the XML namespace, then throw
+ * a "NamespaceError" DOMException.
+ * 8. If either qualifiedName or prefix is "xmlns" and namespace is not the
+ * XMLNS namespace, then throw a "NamespaceError" DOMException.
+ * 9. If namespace is the XMLNS namespace and neither qualifiedName nor
+ * prefix is "xmlns", then throw a "NamespaceError" DOMException.
+ * 10. Return namespace, prefix, and localName.
+ */
+ if (!namespace)
+ namespace = null;
+ namespace_validate(qualifiedName);
+ var parts = qualifiedName.split(':');
+ var prefix = (parts.length === 2 ? parts[0] : null);
+ var localName = (parts.length === 2 ? parts[1] : qualifiedName);
+ if (prefix && namespace === null)
+ throw new DOMException_1.NamespaceError("Qualified name includes a prefix but the namespace is null.");
+ if (prefix === "xml" && namespace !== infra_1.namespace.XML)
+ throw new DOMException_1.NamespaceError("Qualified name includes the \"xml\" prefix but the namespace is not the XML namespace.");
+ if (namespace !== infra_1.namespace.XMLNS &&
+ (prefix === "xmlns" || qualifiedName === "xmlns"))
+ throw new DOMException_1.NamespaceError("Qualified name includes the \"xmlns\" prefix but the namespace is not the XMLNS namespace.");
+ if (namespace === infra_1.namespace.XMLNS &&
+ (prefix !== "xmlns" && qualifiedName !== "xmlns"))
+ throw new DOMException_1.NamespaceError("Qualified name does not include the \"xmlns\" prefix but the namespace is the XMLNS namespace.");
+ return [namespace, prefix, localName];
+}
+exports.namespace_validateAndExtract = namespace_validateAndExtract;
+/**
+ * Extracts a prefix and localName from the given qualified name.
+ *
+ * @param qualifiedName - qualified name
+ *
+ * @returns an tuple with `prefix` and `localName`.
+ */
+function namespace_extractQName(qualifiedName) {
+ namespace_validate(qualifiedName);
+ var parts = qualifiedName.split(':');
+ var prefix = (parts.length === 2 ? parts[0] : null);
+ var localName = (parts.length === 2 ? parts[1] : qualifiedName);
+ return [prefix, localName];
+}
+exports.namespace_extractQName = namespace_extractQName;
+//# sourceMappingURL=NamespaceAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js.map
new file mode 100644
index 0000000..884898f
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"NamespaceAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/NamespaceAlgorithm.ts"],"names":[],"mappings":";;AAAA,oDAA2E;AAC3E,yCAA6D;AAC7D,+CAAwD;AAExD;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,aAAqB;IACtD;;;;OAIG;IACH,IAAI,CAAC,yBAAU,CAAC,aAAa,CAAC;QAC5B,MAAM,IAAI,oCAAqB,CAAC,uBAAqB,aAAe,CAAC,CAAA;IAEvE,IAAI,CAAC,0BAAW,CAAC,aAAa,CAAC;QAC7B,MAAM,IAAI,oCAAqB,CAAC,iCAA+B,aAAa,MAAG,CAAC,CAAA;AACpF,CAAC;AAXD,gDAWC;AAED;;;;;;;;;GASG;AACH,SAAgB,4BAA4B,CAAC,SAAwB,EAAE,aAAqB;IAG1F;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CAAC,SAAS;QAAE,SAAS,GAAG,IAAI,CAAA;IAEhC,kBAAkB,CAAC,aAAa,CAAC,CAAA;IAEjC,IAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACtC,IAAM,MAAM,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IACrD,IAAM,SAAS,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAA;IAEjE,IAAI,MAAM,IAAI,SAAS,KAAK,IAAI;QAC9B,MAAM,IAAI,6BAAc,CAAC,6DAA6D,CAAC,CAAA;IAEzF,IAAI,MAAM,KAAK,KAAK,IAAI,SAAS,KAAK,iBAAc,CAAC,GAAG;QACtD,MAAM,IAAI,6BAAc,CAAC,wFAAsF,CAAC,CAAA;IAElH,IAAI,SAAS,KAAK,iBAAc,CAAC,KAAK;QACpC,CAAC,MAAM,KAAK,OAAO,IAAI,aAAa,KAAK,OAAO,CAAC;QACjD,MAAM,IAAI,6BAAc,CAAC,4FAA0F,CAAC,CAAA;IAEtH,IAAI,SAAS,KAAK,iBAAc,CAAC,KAAK;QACpC,CAAC,MAAM,KAAK,OAAO,IAAI,aAAa,KAAK,OAAO,CAAC;QACjD,MAAM,IAAI,6BAAc,CAAC,gGAA8F,CAAC,CAAA;IAE1H,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,CAAA;AACvC,CAAC;AA3CD,oEA2CC;AAED;;;;;;GAMG;AACH,SAAgB,sBAAsB,CAAC,aAAqB;IAE1D,kBAAkB,CAAC,aAAa,CAAC,CAAA;IAEjC,IAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACtC,IAAM,MAAM,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IACrD,IAAM,SAAS,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAA;IAEjE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AAC5B,CAAC;AATD,wDASC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.d.ts
new file mode 100644
index 0000000..dde3bb9
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.d.ts
@@ -0,0 +1,68 @@
+import { Element, Node, Document, HTMLCollection } from "../dom/interfaces";
+/**
+ * Replaces the contents of the given node with a single text node.
+ *
+ * @param string - node contents
+ * @param parent - a node
+ */
+export declare function node_stringReplaceAll(str: string, parent: Node): void;
+/**
+ * Clones a node.
+ *
+ * @param node - a node to clone
+ * @param document - the document to own the cloned node
+ * @param cloneChildrenFlag - whether to clone node's children
+ */
+export declare function node_clone(node: Node, document?: Document | null, cloneChildrenFlag?: boolean): Node;
+/**
+ * Determines if two nodes can be considered equal.
+ *
+ * @param a - node to compare
+ * @param b - node to compare
+ */
+export declare function node_equals(a: Node, b: Node): boolean;
+/**
+ * Returns a collection of elements with the given qualified name which are
+ * descendants of the given root node.
+ * See: https://dom.spec.whatwg.org/#concept-getelementsbytagname
+ *
+ * @param qualifiedName - qualified name
+ * @param root - root node
+ */
+export declare function node_listOfElementsWithQualifiedName(qualifiedName: string, root: Node): HTMLCollection;
+/**
+ * Returns a collection of elements with the given namespace which are
+ * descendants of the given root node.
+ * See: https://dom.spec.whatwg.org/#concept-getelementsbytagnamens
+ *
+ * @param namespace - element namespace
+ * @param localName - local name
+ * @param root - root node
+ */
+export declare function node_listOfElementsWithNamespace(namespace: string | null, localName: string, root: Node): HTMLCollection;
+/**
+ * Returns a collection of elements with the given class names which are
+ * descendants of the given root node.
+ * See: https://dom.spec.whatwg.org/#concept-getelementsbyclassname
+ *
+ * @param namespace - element namespace
+ * @param localName - local name
+ * @param root - root node
+ */
+export declare function node_listOfElementsWithClassNames(classNames: string, root: Node): HTMLCollection;
+/**
+ * Searches for a namespace prefix associated with the given namespace
+ * starting from the given element through its ancestors.
+ *
+ * @param element - an element node to start searching at
+ * @param namespace - namespace to search for
+ */
+export declare function node_locateANamespacePrefix(element: Element, namespace: string | null): string | null;
+/**
+ * Searches for a namespace associated with the given namespace prefix
+ * starting from the given node through its ancestors.
+ *
+ * @param node - a node to start searching at
+ * @param prefix - namespace prefix to search for
+ */
+export declare function node_locateANamespace(node: Node, prefix: string | null): string | null;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js
new file mode 100644
index 0000000..ddcb0c3
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js
@@ -0,0 +1,543 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("../dom/DOMImpl");
+var util_1 = require("../util");
+var infra_1 = require("@oozcitak/infra");
+var CreateAlgorithm_1 = require("./CreateAlgorithm");
+var OrderedSetAlgorithm_1 = require("./OrderedSetAlgorithm");
+var DOMAlgorithm_1 = require("./DOMAlgorithm");
+var MutationAlgorithm_1 = require("./MutationAlgorithm");
+var ElementAlgorithm_1 = require("./ElementAlgorithm");
+/**
+ * Replaces the contents of the given node with a single text node.
+ *
+ * @param string - node contents
+ * @param parent - a node
+ */
+function node_stringReplaceAll(str, parent) {
+ /**
+ * 1. Let node be null.
+ * 2. If string is not the empty string, then set node to a new Text node
+ * whose data is string and node document is parent’s node document.
+ * 3. Replace all with node within parent.
+ */
+ var node = null;
+ if (str !== '') {
+ node = CreateAlgorithm_1.create_text(parent._nodeDocument, str);
+ }
+ MutationAlgorithm_1.mutation_replaceAll(node, parent);
+}
+exports.node_stringReplaceAll = node_stringReplaceAll;
+/**
+ * Clones a node.
+ *
+ * @param node - a node to clone
+ * @param document - the document to own the cloned node
+ * @param cloneChildrenFlag - whether to clone node's children
+ */
+function node_clone(node, document, cloneChildrenFlag) {
+ var e_1, _a, e_2, _b;
+ if (document === void 0) { document = null; }
+ if (cloneChildrenFlag === void 0) { cloneChildrenFlag = false; }
+ /**
+ * 1. If document is not given, let document be node’s node document.
+ */
+ if (document === null)
+ document = node._nodeDocument;
+ var copy;
+ if (util_1.Guard.isElementNode(node)) {
+ /**
+ * 2. If node is an element, then:
+ * 2.1. Let copy be the result of creating an element, given document,
+ * node’s local name, node’s namespace, node’s namespace prefix,
+ * and node’s is value, with the synchronous custom elements flag unset.
+ * 2.2. For each attribute in node’s attribute list:
+ * 2.2.1. Let copyAttribute be a clone of attribute.
+ * 2.2.2. Append copyAttribute to copy.
+ */
+ copy = ElementAlgorithm_1.element_createAnElement(document, node._localName, node._namespace, node._namespacePrefix, node._is, false);
+ try {
+ for (var _c = __values(node._attributeList), _d = _c.next(); !_d.done; _d = _c.next()) {
+ var attribute = _d.value;
+ var copyAttribute = node_clone(attribute, document);
+ ElementAlgorithm_1.element_append(copyAttribute, copy);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ }
+ else {
+ /**
+ * 3. Otherwise, let copy be a node that implements the same interfaces as
+ * node, and fulfills these additional requirements, switching on node:
+ * - Document
+ * Set copy’s encoding, content type, URL, origin, type, and mode, to those
+ * of node.
+ * - DocumentType
+ * Set copy’s name, public ID, and system ID, to those of node.
+ * - Attr
+ * Set copy’s namespace, namespace prefix, local name, and value, to
+ * those of node.
+ * - Text
+ * - Comment
+ * Set copy’s data, to that of node.
+ * - ProcessingInstruction
+ * Set copy’s target and data to those of node.
+ * - Any other node
+ */
+ if (util_1.Guard.isDocumentNode(node)) {
+ var doc = CreateAlgorithm_1.create_document();
+ doc._encoding = node._encoding;
+ doc._contentType = node._contentType;
+ doc._URL = node._URL;
+ doc._origin = node._origin;
+ doc._type = node._type;
+ doc._mode = node._mode;
+ copy = doc;
+ }
+ else if (util_1.Guard.isDocumentTypeNode(node)) {
+ var doctype = CreateAlgorithm_1.create_documentType(document, node._name, node._publicId, node._systemId);
+ copy = doctype;
+ }
+ else if (util_1.Guard.isAttrNode(node)) {
+ var attr = CreateAlgorithm_1.create_attr(document, node.localName);
+ attr._namespace = node._namespace;
+ attr._namespacePrefix = node._namespacePrefix;
+ attr._value = node._value;
+ copy = attr;
+ }
+ else if (util_1.Guard.isExclusiveTextNode(node)) {
+ copy = CreateAlgorithm_1.create_text(document, node._data);
+ }
+ else if (util_1.Guard.isCDATASectionNode(node)) {
+ copy = CreateAlgorithm_1.create_cdataSection(document, node._data);
+ }
+ else if (util_1.Guard.isCommentNode(node)) {
+ copy = CreateAlgorithm_1.create_comment(document, node._data);
+ }
+ else if (util_1.Guard.isProcessingInstructionNode(node)) {
+ copy = CreateAlgorithm_1.create_processingInstruction(document, node._target, node._data);
+ }
+ else if (util_1.Guard.isDocumentFragmentNode(node)) {
+ copy = CreateAlgorithm_1.create_documentFragment(document);
+ }
+ else {
+ copy = Object.create(node);
+ }
+ }
+ /**
+ * 4. Set copy’s node document and document to copy, if copy is a document,
+ * and set copy’s node document to document otherwise.
+ */
+ if (util_1.Guard.isDocumentNode(copy)) {
+ copy._nodeDocument = copy;
+ document = copy;
+ }
+ else {
+ copy._nodeDocument = document;
+ }
+ /**
+ * 5. Run any cloning steps defined for node in other applicable
+ * specifications and pass copy, node, document and the clone children flag
+ * if set, as parameters.
+ */
+ if (DOMImpl_1.dom.features.steps) {
+ DOMAlgorithm_1.dom_runCloningSteps(copy, node, document, cloneChildrenFlag);
+ }
+ /**
+ * 6. If the clone children flag is set, clone all the children of node and
+ * append them to copy, with document as specified and the clone children
+ * flag being set.
+ */
+ if (cloneChildrenFlag) {
+ try {
+ for (var _e = __values(node._children), _f = _e.next(); !_f.done; _f = _e.next()) {
+ var child = _f.value;
+ var childCopy = node_clone(child, document, true);
+ MutationAlgorithm_1.mutation_append(childCopy, copy);
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ }
+ /**
+ * 7. Return copy.
+ */
+ return copy;
+}
+exports.node_clone = node_clone;
+/**
+ * Determines if two nodes can be considered equal.
+ *
+ * @param a - node to compare
+ * @param b - node to compare
+ */
+function node_equals(a, b) {
+ var e_3, _a, e_4, _b;
+ /**
+ * 1. A and B’s nodeType attribute value is identical.
+ */
+ if (a._nodeType !== b._nodeType)
+ return false;
+ /**
+ * 2. The following are also equal, depending on A:
+ * - DocumentType
+ * Its name, public ID, and system ID.
+ * - Element
+ * Its namespace, namespace prefix, local name, and its attribute list’s size.
+ * - Attr
+ * Its namespace, local name, and value.
+ * - ProcessingInstruction
+ * Its target and data.
+ * - Text
+ * - Comment
+ * Its data.
+ */
+ if (util_1.Guard.isDocumentTypeNode(a) && util_1.Guard.isDocumentTypeNode(b)) {
+ if (a._name !== b._name || a._publicId !== b._publicId ||
+ a._systemId !== b._systemId)
+ return false;
+ }
+ else if (util_1.Guard.isElementNode(a) && util_1.Guard.isElementNode(b)) {
+ if (a._namespace !== b._namespace || a._namespacePrefix !== b._namespacePrefix ||
+ a._localName !== b._localName ||
+ a._attributeList.length !== b._attributeList.length)
+ return false;
+ }
+ else if (util_1.Guard.isAttrNode(a) && util_1.Guard.isAttrNode(b)) {
+ if (a._namespace !== b._namespace || a._localName !== b._localName ||
+ a._value !== b._value)
+ return false;
+ }
+ else if (util_1.Guard.isProcessingInstructionNode(a) && util_1.Guard.isProcessingInstructionNode(b)) {
+ if (a._target !== b._target || a._data !== b._data)
+ return false;
+ }
+ else if (util_1.Guard.isCharacterDataNode(a) && util_1.Guard.isCharacterDataNode(b)) {
+ if (a._data !== b._data)
+ return false;
+ }
+ /**
+ * 3. If A is an element, each attribute in its attribute list has an attribute
+ * that equals an attribute in B’s attribute list.
+ */
+ if (util_1.Guard.isElementNode(a) && util_1.Guard.isElementNode(b)) {
+ var attrMap = {};
+ try {
+ for (var _c = __values(a._attributeList), _d = _c.next(); !_d.done; _d = _c.next()) {
+ var attrA = _d.value;
+ attrMap[attrA._localName] = attrA;
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ try {
+ for (var _e = __values(b._attributeList), _f = _e.next(); !_f.done; _f = _e.next()) {
+ var attrB = _f.value;
+ var attrA = attrMap[attrB._localName];
+ if (!attrA)
+ return false;
+ if (!node_equals(attrA, attrB))
+ return false;
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+ }
+ /**
+ * 4. A and B have the same number of children.
+ * 5. Each child of A equals the child of B at the identical index.
+ */
+ if (a._children.size !== b._children.size)
+ return false;
+ var itA = a._children[Symbol.iterator]();
+ var itB = b._children[Symbol.iterator]();
+ var resultA = itA.next();
+ var resultB = itB.next();
+ while (!resultA.done && !resultB.done) {
+ var child1 = resultA.value;
+ var child2 = resultB.value;
+ if (!node_equals(child1, child2))
+ return false;
+ resultA = itA.next();
+ resultB = itB.next();
+ }
+ return true;
+}
+exports.node_equals = node_equals;
+/**
+ * Returns a collection of elements with the given qualified name which are
+ * descendants of the given root node.
+ * See: https://dom.spec.whatwg.org/#concept-getelementsbytagname
+ *
+ * @param qualifiedName - qualified name
+ * @param root - root node
+ */
+function node_listOfElementsWithQualifiedName(qualifiedName, root) {
+ /**
+ * 1. If qualifiedName is "*" (U+002A), return a HTMLCollection rooted at
+ * root, whose filter matches only descendant elements.
+ * 2. Otherwise, if root’s node document is an HTML document, return a
+ * HTMLCollection rooted at root, whose filter matches the following
+ * descendant elements:
+ * 2.1. Whose namespace is the HTML namespace and whose qualified name is
+ * qualifiedName, in ASCII lowercase.
+ * 2.2. Whose namespace is not the HTML namespace and whose qualified name
+ * is qualifiedName.
+ * 3. Otherwise, return a HTMLCollection rooted at root, whose filter
+ * matches descendant elements whose qualified name is qualifiedName.
+ */
+ if (qualifiedName === "*") {
+ return CreateAlgorithm_1.create_htmlCollection(root);
+ }
+ else if (root._nodeDocument._type === "html") {
+ return CreateAlgorithm_1.create_htmlCollection(root, function (ele) {
+ if (ele._namespace === infra_1.namespace.HTML &&
+ ele._qualifiedName === qualifiedName.toLowerCase()) {
+ return true;
+ }
+ else if (ele._namespace !== infra_1.namespace.HTML &&
+ ele._qualifiedName === qualifiedName) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ });
+ }
+ else {
+ return CreateAlgorithm_1.create_htmlCollection(root, function (ele) {
+ return (ele._qualifiedName === qualifiedName);
+ });
+ }
+}
+exports.node_listOfElementsWithQualifiedName = node_listOfElementsWithQualifiedName;
+/**
+ * Returns a collection of elements with the given namespace which are
+ * descendants of the given root node.
+ * See: https://dom.spec.whatwg.org/#concept-getelementsbytagnamens
+ *
+ * @param namespace - element namespace
+ * @param localName - local name
+ * @param root - root node
+ */
+function node_listOfElementsWithNamespace(namespace, localName, root) {
+ /**
+ * 1. If namespace is the empty string, set it to null.
+ * 2. If both namespace and localName are "*" (U+002A), return a
+ * HTMLCollection rooted at root, whose filter matches descendant elements.
+ * 3. Otherwise, if namespace is "*" (U+002A), return a HTMLCollection
+ * rooted at root, whose filter matches descendant elements whose local
+ * name is localName.
+ * 4. Otherwise, if localName is "*" (U+002A), return a HTMLCollection
+ * rooted at root, whose filter matches descendant elements whose
+ * namespace is namespace.
+ * 5. Otherwise, return a HTMLCollection rooted at root, whose filter
+ * matches descendant elements whose namespace is namespace and local
+ * name is localName.
+ */
+ if (namespace === '')
+ namespace = null;
+ if (namespace === "*" && localName === "*") {
+ return CreateAlgorithm_1.create_htmlCollection(root);
+ }
+ else if (namespace === "*") {
+ return CreateAlgorithm_1.create_htmlCollection(root, function (ele) {
+ return (ele._localName === localName);
+ });
+ }
+ else if (localName === "*") {
+ return CreateAlgorithm_1.create_htmlCollection(root, function (ele) {
+ return (ele._namespace === namespace);
+ });
+ }
+ else {
+ return CreateAlgorithm_1.create_htmlCollection(root, function (ele) {
+ return (ele._localName === localName && ele._namespace === namespace);
+ });
+ }
+}
+exports.node_listOfElementsWithNamespace = node_listOfElementsWithNamespace;
+/**
+ * Returns a collection of elements with the given class names which are
+ * descendants of the given root node.
+ * See: https://dom.spec.whatwg.org/#concept-getelementsbyclassname
+ *
+ * @param namespace - element namespace
+ * @param localName - local name
+ * @param root - root node
+ */
+function node_listOfElementsWithClassNames(classNames, root) {
+ /**
+ * 1. Let classes be the result of running the ordered set parser
+ * on classNames.
+ * 2. If classes is the empty set, return an empty HTMLCollection.
+ * 3. Return a HTMLCollection rooted at root, whose filter matches
+ * descendant elements that have all their classes in classes.
+ * The comparisons for the classes must be done in an ASCII case-insensitive
+ * manner if root’s node document’s mode is "quirks", and in a
+ * case-sensitive manner otherwise.
+ */
+ var classes = OrderedSetAlgorithm_1.orderedSet_parse(classNames);
+ if (classes.size === 0) {
+ return CreateAlgorithm_1.create_htmlCollection(root, function () { return false; });
+ }
+ var caseSensitive = (root._nodeDocument._mode !== "quirks");
+ return CreateAlgorithm_1.create_htmlCollection(root, function (ele) {
+ var eleClasses = ele.classList;
+ return OrderedSetAlgorithm_1.orderedSet_contains(eleClasses._tokenSet, classes, caseSensitive);
+ });
+}
+exports.node_listOfElementsWithClassNames = node_listOfElementsWithClassNames;
+/**
+ * Searches for a namespace prefix associated with the given namespace
+ * starting from the given element through its ancestors.
+ *
+ * @param element - an element node to start searching at
+ * @param namespace - namespace to search for
+ */
+function node_locateANamespacePrefix(element, namespace) {
+ /**
+ * 1. If element’s namespace is namespace and its namespace prefix is not
+ * null, then return its namespace prefix.
+ */
+ if (element._namespace === namespace && element._namespacePrefix !== null) {
+ return element._namespacePrefix;
+ }
+ /**
+ * 2. If element has an attribute whose namespace prefix is "xmlns" and
+ * value is namespace, then return element’s first such attribute’s
+ * local name.
+ */
+ for (var i = 0; i < element._attributeList.length; i++) {
+ var attr = element._attributeList[i];
+ if (attr._namespacePrefix === "xmlns" && attr._value === namespace) {
+ return attr._localName;
+ }
+ }
+ /**
+ * 3. If element’s parent element is not null, then return the result of
+ * running locate a namespace prefix on that element using namespace.
+ */
+ if (element._parent && util_1.Guard.isElementNode(element._parent)) {
+ return node_locateANamespacePrefix(element._parent, namespace);
+ }
+ /**
+ * 4. Return null.
+ */
+ return null;
+}
+exports.node_locateANamespacePrefix = node_locateANamespacePrefix;
+/**
+ * Searches for a namespace associated with the given namespace prefix
+ * starting from the given node through its ancestors.
+ *
+ * @param node - a node to start searching at
+ * @param prefix - namespace prefix to search for
+ */
+function node_locateANamespace(node, prefix) {
+ if (util_1.Guard.isElementNode(node)) {
+ /**
+ * 1. If its namespace is not null and its namespace prefix is prefix,
+ * then return namespace.
+ */
+ if (node._namespace !== null && node._namespacePrefix === prefix) {
+ return node._namespace;
+ }
+ /**
+ * 2. If it has an attribute whose namespace is the XMLNS namespace,
+ * namespace prefix is "xmlns", and local name is prefix, or if prefix
+ * is null and it has an attribute whose namespace is the XMLNS namespace,
+ * namespace prefix is null, and local name is "xmlns", then return its
+ * value if it is not the empty string, and null otherwise.
+ */
+ for (var i = 0; i < node._attributeList.length; i++) {
+ var attr = node._attributeList[i];
+ if (attr._namespace === infra_1.namespace.XMLNS &&
+ attr._namespacePrefix === "xmlns" &&
+ attr._localName === prefix) {
+ return attr._value || null;
+ }
+ if (prefix === null && attr._namespace === infra_1.namespace.XMLNS &&
+ attr._namespacePrefix === null && attr._localName === "xmlns") {
+ return attr._value || null;
+ }
+ }
+ /**
+ * 3. If its parent element is null, then return null.
+ */
+ if (node.parentElement === null)
+ return null;
+ /**
+ * 4. Return the result of running locate a namespace on its parent
+ * element using prefix.
+ */
+ return node_locateANamespace(node.parentElement, prefix);
+ }
+ else if (util_1.Guard.isDocumentNode(node)) {
+ /**
+ * 1. If its document element is null, then return null.
+ * 2. Return the result of running locate a namespace on its document
+ * element using prefix.
+ */
+ if (node.documentElement === null)
+ return null;
+ return node_locateANamespace(node.documentElement, prefix);
+ }
+ else if (util_1.Guard.isDocumentTypeNode(node) || util_1.Guard.isDocumentFragmentNode(node)) {
+ return null;
+ }
+ else if (util_1.Guard.isAttrNode(node)) {
+ /**
+ * 1. If its element is null, then return null.
+ * 2. Return the result of running locate a namespace on its element
+ * using prefix.
+ */
+ if (node._element === null)
+ return null;
+ return node_locateANamespace(node._element, prefix);
+ }
+ else {
+ /**
+ * 1. If its parent element is null, then return null.
+ * 2. Return the result of running locate a namespace on its parent
+ * element using prefix.
+ */
+ if (!node._parent || !util_1.Guard.isElementNode(node._parent))
+ return null;
+ return node_locateANamespace(node._parent, prefix);
+ }
+}
+exports.node_locateANamespace = node_locateANamespace;
+//# sourceMappingURL=NodeAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js.map
new file mode 100644
index 0000000..0ed2811
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"NodeAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/NodeAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,0CAAoC;AAIpC,gCAA+B;AAC/B,yCAA6D;AAC7D,qDAI0B;AAC1B,6DAA6E;AAC7E,+CAAoD;AACpD,yDAA0E;AAC1E,uDAA4E;AAE5E;;;;;GAKG;AACH,SAAgB,qBAAqB,CAAC,GAAW,EAAE,MAAY;IAC7D;;;;;OAKG;IACH,IAAI,IAAI,GAAgB,IAAI,CAAA;IAC5B,IAAI,GAAG,KAAK,EAAE,EAAE;QACd,IAAI,GAAG,6BAAW,CAAC,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,CAAA;KAC9C;IACD,uCAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;AACnC,CAAC;AAZD,sDAYC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAU,EAAE,QAAgC,EAC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Algorithm.d.ts
new file mode 100644
index 0000000..296601d
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.d.ts
@@ -0,0 +1,15 @@
+import { Node, NodeIterator } from "../dom/interfaces";
+import { FixedSizeSet } from "@oozcitak/util";
+/**
+ * Returns the next or previous node in the subtree, or `null` if
+ * there are none.
+ *
+ * @param iterator - the `NodeIterator` instance
+ * @param forward- `true` to return the next node, or `false` to
+ * return the previous node.
+ */
+export declare function nodeIterator_traverse(iterator: NodeIterator, forward: boolean): Node | null;
+/**
+ * Gets the global iterator list.
+ */
+export declare function nodeIterator_iteratorList(): FixedSizeSet;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js
new file mode 100644
index 0000000..0fb6248
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js
@@ -0,0 +1,105 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("../dom/DOMImpl");
+var interfaces_1 = require("../dom/interfaces");
+var TraversalAlgorithm_1 = require("./TraversalAlgorithm");
+var TreeAlgorithm_1 = require("./TreeAlgorithm");
+/**
+ * Returns the next or previous node in the subtree, or `null` if
+ * there are none.
+ *
+ * @param iterator - the `NodeIterator` instance
+ * @param forward- `true` to return the next node, or `false` to
+ * return the previous node.
+ */
+function nodeIterator_traverse(iterator, forward) {
+ /**
+ * 1. Let node be iterator’s reference.
+ * 2. Let beforeNode be iterator’s pointer before reference.
+ */
+ var node = iterator._reference;
+ var beforeNode = iterator._pointerBeforeReference;
+ /**
+ * 3. While true:
+ */
+ while (true) {
+ /**
+ * 3.1. Branch on direction:
+ */
+ if (forward) {
+ /**
+ * - next
+ */
+ if (!beforeNode) {
+ /**
+ * If beforeNode is false, then set node to the first node following
+ * node in iterator’s iterator collection. If there is no such node,
+ * then return null.
+ */
+ var nextNode = TreeAlgorithm_1.tree_getFollowingNode(iterator._root, node);
+ if (nextNode) {
+ node = nextNode;
+ }
+ else {
+ return null;
+ }
+ }
+ else {
+ /**
+ * If beforeNode is true, then set it to false.
+ */
+ beforeNode = false;
+ }
+ }
+ else {
+ /**
+ * - previous
+ */
+ if (beforeNode) {
+ /**
+ * If beforeNode is true, then set node to the first node preceding
+ * node in iterator’s iterator collection. If there is no such node,
+ * then return null.
+ */
+ var prevNode = TreeAlgorithm_1.tree_getPrecedingNode(iterator.root, node);
+ if (prevNode) {
+ node = prevNode;
+ }
+ else {
+ return null;
+ }
+ }
+ else {
+ /**
+ * If beforeNode is false, then set it to true.
+ */
+ beforeNode = true;
+ }
+ }
+ /**
+ * 3.2. Let result be the result of filtering node within iterator.
+ * 3.3. If result is FILTER_ACCEPT, then break.
+ */
+ var result = TraversalAlgorithm_1.traversal_filter(iterator, node);
+ if (result === interfaces_1.FilterResult.Accept) {
+ break;
+ }
+ }
+ /**
+ * 4. Set iterator’s reference to node.
+ * 5. Set iterator’s pointer before reference to beforeNode.
+ * 6. Return node.
+ */
+ iterator._reference = node;
+ iterator._pointerBeforeReference = beforeNode;
+ return node;
+}
+exports.nodeIterator_traverse = nodeIterator_traverse;
+/**
+ * Gets the global iterator list.
+ */
+function nodeIterator_iteratorList() {
+ return DOMImpl_1.dom.window._iteratorList;
+}
+exports.nodeIterator_iteratorList = nodeIterator_iteratorList;
+//# sourceMappingURL=NodeIteratorAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js.map
new file mode 100644
index 0000000..47a85d6
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"NodeIteratorAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/NodeIteratorAlgorithm.ts"],"names":[],"mappings":";;AA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C;AA/ED,sDA+EC;AAED;;GAEG;AACH,SAAgB,yBAAyB;IACvC,OAAO,aAAG,CAAC,MAAM,CAAC,aAAa,CAAA;AACjC,CAAC;AAFD,8DAEC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.d.ts
new file mode 100644
index 0000000..491d776
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.d.ts
@@ -0,0 +1,27 @@
+/**
+ * Converts a whitespace separated string into an array of tokens.
+ *
+ * @param value - a string of whitespace separated tokens
+ */
+export declare function orderedSet_parse(value: string): Set;
+/**
+ * Converts an array of tokens into a space separated string.
+ *
+ * @param tokens - an array of token strings
+ */
+export declare function orderedSet_serialize(tokens: Set): string;
+/**
+ * Removes duplicate tokens and convert all whitespace characters
+ * to space.
+ *
+ * @param value - a string of whitespace separated tokens
+ */
+export declare function orderedSet_sanitize(value: string): string;
+/**
+ * Determines whether a set contains the other.
+ *
+ * @param set1 - a set
+ * @param set1 - a set that is contained in set1
+ * @param caseSensitive - whether matches are case-sensitive
+ */
+export declare function orderedSet_contains(set1: Set, set2: Set, caseSensitive: boolean): boolean;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js
new file mode 100644
index 0000000..f606e35
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js
@@ -0,0 +1,125 @@
+"use strict";
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+var __spread = (this && this.__spread) || function () {
+ for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
+ return ar;
+};
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var infra_1 = require("@oozcitak/infra");
+/**
+ * Converts a whitespace separated string into an array of tokens.
+ *
+ * @param value - a string of whitespace separated tokens
+ */
+function orderedSet_parse(value) {
+ /**
+ * 1. Let inputTokens be the result of splitting input on ASCII whitespace.
+ * 2. Let tokens be a new ordered set.
+ * 3. For each token in inputTokens, append token to tokens.
+ * 4. Return tokens.
+ */
+ var inputTokens = infra_1.string.splitAStringOnASCIIWhitespace(value);
+ return new Set(inputTokens);
+}
+exports.orderedSet_parse = orderedSet_parse;
+/**
+ * Converts an array of tokens into a space separated string.
+ *
+ * @param tokens - an array of token strings
+ */
+function orderedSet_serialize(tokens) {
+ /**
+ * The ordered set serializer takes a set and returns the concatenation of
+ * set using U+0020 SPACE.
+ */
+ return __spread(tokens).join(' ');
+}
+exports.orderedSet_serialize = orderedSet_serialize;
+/**
+ * Removes duplicate tokens and convert all whitespace characters
+ * to space.
+ *
+ * @param value - a string of whitespace separated tokens
+ */
+function orderedSet_sanitize(value) {
+ return orderedSet_serialize(orderedSet_parse(value));
+}
+exports.orderedSet_sanitize = orderedSet_sanitize;
+/**
+ * Determines whether a set contains the other.
+ *
+ * @param set1 - a set
+ * @param set1 - a set that is contained in set1
+ * @param caseSensitive - whether matches are case-sensitive
+ */
+function orderedSet_contains(set1, set2, caseSensitive) {
+ var e_1, _a, e_2, _b;
+ try {
+ for (var set2_1 = __values(set2), set2_1_1 = set2_1.next(); !set2_1_1.done; set2_1_1 = set2_1.next()) {
+ var val2 = set2_1_1.value;
+ var found = false;
+ try {
+ for (var set1_1 = (e_2 = void 0, __values(set1)), set1_1_1 = set1_1.next(); !set1_1_1.done; set1_1_1 = set1_1.next()) {
+ var val1 = set1_1_1.value;
+ if (caseSensitive) {
+ if (val1 === val2) {
+ found = true;
+ break;
+ }
+ }
+ else {
+ if (val1.toUpperCase() === val2.toUpperCase()) {
+ found = true;
+ break;
+ }
+ }
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (set1_1_1 && !set1_1_1.done && (_b = set1_1.return)) _b.call(set1_1);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ if (!found)
+ return false;
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (set2_1_1 && !set2_1_1.done && (_a = set2_1.return)) _a.call(set2_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ return true;
+}
+exports.orderedSet_contains = orderedSet_contains;
+//# sourceMappingURL=OrderedSetAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js.map
new file mode 100644
index 0000000..6d3a739
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"OrderedSetAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/OrderedSetAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAuD;AAEvD;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,KAAa;IAC5C;;;;;OAKG;IACH,IAAM,WAAW,GAAG,cAAW,CAAC,6BAA6B,CAAC,KAAK,CAAC,CAAA;IACpE,OAAO,IAAI,GAAG,CAAS,WAAW,CAAC,CAAA;AACrC,CAAC;AATD,4CASC;AAED;;;;GAIG;AACH,SAAgB,oBAAoB,CAAC,MAAmB;IACtD;;;OAGG;IACH,OAAO,SAAI,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;AAC9B,CAAC;AAND,oDAMC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,KAAa;IAC/C,OAAO,oBAAoB,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAA;AACtD,CAAC;AAFD,kDAEC;AAED;;;;;;GAMG;AACH,SAAgB,mBAAmB,CAAC,IAAiB,EAAE,IAAiB,EACtE,aAAsB;;;QAEtB,KAAmB,IAAA,SAAA,SAAA,IAAI,CAAA,0BAAA,4CAAE;YAApB,IAAM,IAAI,iBAAA;YACb,IAAI,KAAK,GAAG,KAAK,CAAA;;gBACjB,KAAmB,IAAA,wBAAA,SAAA,IAAI,CAAA,CAAA,0BAAA,4CAAE;oBAApB,IAAM,IAAI,iBAAA;oBACb,IAAI,aAAa,EAAE;wBACjB,IAAI,IAAI,KAAK,IAAI,EAAE;4BACjB,KAAK,GAAG,IAAI,CAAA;4BACZ,MAAK;yBACN;qBACF;yBAAM;wBACL,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,EAAE;4BAC7C,KAAK,GAAG,IAAI,CAAA;4BACZ,MAAK;yBACN;qBACF;iBACF;;;;;;;;;YACD,IAAI,CAAC,KAAK;gBAAE,OAAO,KAAK,CAAA;SACzB;;;;;;;;;IAED,OAAO,IAAI,CAAA;AACb,CAAC;AAtBD,kDAsBC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.d.ts
new file mode 100644
index 0000000..5f78c30
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.d.ts
@@ -0,0 +1,9 @@
+import { Node, Document } from "../dom/interfaces";
+/**
+ * Converts the given nodes or strings into a node (if `nodes` has
+ * only one element) or a document fragment.
+ *
+ * @param nodes - the array of nodes or strings,
+ * @param document - owner document
+ */
+export declare function parentNode_convertNodesIntoANode(nodes: (Node | string)[], document: Document): Node;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js
new file mode 100644
index 0000000..d77b976
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js
@@ -0,0 +1,69 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("@oozcitak/util");
+var CreateAlgorithm_1 = require("./CreateAlgorithm");
+/**
+ * Converts the given nodes or strings into a node (if `nodes` has
+ * only one element) or a document fragment.
+ *
+ * @param nodes - the array of nodes or strings,
+ * @param document - owner document
+ */
+function parentNode_convertNodesIntoANode(nodes, document) {
+ var e_1, _a;
+ /**
+ * 1. Let node be null.
+ * 2. Replace each string in nodes with a new Text node whose data is the
+ * string and node document is document.
+ */
+ var node = null;
+ for (var i = 0; i < nodes.length; i++) {
+ var item = nodes[i];
+ if (util_1.isString(item)) {
+ var text = CreateAlgorithm_1.create_text(document, item);
+ nodes[i] = text;
+ }
+ }
+ /**
+ * 3. If nodes contains one node, set node to that node.
+ * 4. Otherwise, set node to a new DocumentFragment whose node document is
+ * document, and then append each node in nodes, if any, to it.
+ */
+ if (nodes.length === 1) {
+ node = nodes[0];
+ }
+ else {
+ node = CreateAlgorithm_1.create_documentFragment(document);
+ var ns = node;
+ try {
+ for (var nodes_1 = __values(nodes), nodes_1_1 = nodes_1.next(); !nodes_1_1.done; nodes_1_1 = nodes_1.next()) {
+ var item = nodes_1_1.value;
+ ns.appendChild(item);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (nodes_1_1 && !nodes_1_1.done && (_a = nodes_1.return)) _a.call(nodes_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ }
+ /**
+ * 5. Return node.
+ */
+ return node;
+}
+exports.parentNode_convertNodesIntoANode = parentNode_convertNodesIntoANode;
+//# sourceMappingURL=ParentNodeAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js.map
new file mode 100644
index 0000000..fee1278
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ParentNodeAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/ParentNodeAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,uCAAyC;AACzC,qDAAwE;AAExE;;;;;;GAMG;AACH,SAAgB,gCAAgC,CAAC,KAAwB,EACvE,QAAkB;;IAElB;;;;OAIG;IACH,IAAI,IAAI,GAAgB,IAAI,CAAA;IAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;QACrB,IAAI,eAAQ,CAAC,IAAI,CAAC,EAAE;YAClB,IAAM,IAAI,GAAG,6BAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;YACxC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;SAChB;KACF;IAED;;;;OAIG;IACH,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,IAAI,GAAG,KAAK,CAAC,CAAC,CAAS,CAAA;KACxB;SAAM;QACL,IAAI,GAAG,yCAAuB,CAAC,QAAQ,CAAC,CAAA;QACxC,IAAM,EAAE,GAAG,IAAI,CAAA;;YACf,KAAmB,IAAA,UAAA,SAAA,KAAK,CAAA,4BAAA,+CAAE;gBAArB,IAAM,IAAI,kBAAA;gBACb,EAAE,CAAC,WAAW,CAAC,IAAY,CAAC,CAAA;aAC7B;;;;;;;;;KACF;IAED;;OAEG;IACH,OAAO,IAAI,CAAA;AACb,CAAC;AApCD,4EAoCC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.d.ts
new file mode 100644
index 0000000..dc1358b
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.d.ts
@@ -0,0 +1,82 @@
+import { Node, AbstractRange, DocumentFragment, Range } from "../dom/interfaces";
+/**
+ * Determines if the node's start boundary point is at its end boundary
+ * point.
+ *
+ * @param range - a range
+ */
+export declare function range_collapsed(range: AbstractRange): boolean;
+/**
+ * Gets the root node of a range.
+ *
+ * @param range - a range
+ */
+export declare function range_root(range: AbstractRange): Node;
+/**
+ * Determines if a node is fully contained in a range.
+ *
+ * @param node - a node
+ * @param range - a range
+ */
+export declare function range_isContained(node: Node, range: AbstractRange): boolean;
+/**
+ * Determines if a node is partially contained in a range.
+ *
+ * @param node - a node
+ * @param range - a range
+ */
+export declare function range_isPartiallyContained(node: Node, range: AbstractRange): boolean;
+/**
+ * Sets the start boundary point of a range.
+ *
+ * @param range - a range
+ * @param node - a node
+ * @param offset - an offset into node
+ */
+export declare function range_setTheStart(range: AbstractRange, node: Node, offset: number): void;
+/**
+ * Sets the end boundary point of a range.
+ *
+ * @param range - a range
+ * @param node - a node
+ * @param offset - an offset into node
+ */
+export declare function range_setTheEnd(range: AbstractRange, node: Node, offset: number): void;
+/**
+ * Selects a node.
+ *
+ * @param range - a range
+ * @param node - a node
+ */
+export declare function range_select(node: Node, range: AbstractRange): void;
+/**
+ * EXtracts the contents of range as a document fragment.
+ *
+ * @param range - a range
+ */
+export declare function range_extract(range: AbstractRange): DocumentFragment;
+/**
+ * Clones the contents of range as a document fragment.
+ *
+ * @param range - a range
+ */
+export declare function range_cloneTheContents(range: AbstractRange): DocumentFragment;
+/**
+ * Inserts a node into a range at the start boundary point.
+ *
+ * @param node - node to insert
+ * @param range - a range
+ */
+export declare function range_insert(node: Node, range: AbstractRange): void;
+/**
+ * Traverses through all contained nodes of a range.
+ *
+ * @param range - a range
+ */
+export declare function range_getContainedNodes(range: Range): Iterable;
+/**
+ * Traverses through all partially contained nodes of a range.
+ *
+ * @param range - a range
+ */
+export declare function range_getPartiallyContainedNodes(range: Range): Iterable;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js
new file mode 100644
index 0000000..4c1423e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js
@@ -0,0 +1,829 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+var __spread = (this && this.__spread) || function () {
+ for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("../dom/interfaces");
+var DOMException_1 = require("../dom/DOMException");
+var util_1 = require("../util");
+var CreateAlgorithm_1 = require("./CreateAlgorithm");
+var TreeAlgorithm_1 = require("./TreeAlgorithm");
+var BoundaryPointAlgorithm_1 = require("./BoundaryPointAlgorithm");
+var CharacterDataAlgorithm_1 = require("./CharacterDataAlgorithm");
+var NodeAlgorithm_1 = require("./NodeAlgorithm");
+var MutationAlgorithm_1 = require("./MutationAlgorithm");
+var TextAlgorithm_1 = require("./TextAlgorithm");
+/**
+ * Determines if the node's start boundary point is at its end boundary
+ * point.
+ *
+ * @param range - a range
+ */
+function range_collapsed(range) {
+ /**
+ * A range is collapsed if its start node is its end node and its start offset is its end offset.
+ */
+ return (range._startNode === range._endNode && range._startOffset === range._endOffset);
+}
+exports.range_collapsed = range_collapsed;
+/**
+ * Gets the root node of a range.
+ *
+ * @param range - a range
+ */
+function range_root(range) {
+ /**
+ * The root of a live range is the root of its start node.
+ */
+ return TreeAlgorithm_1.tree_rootNode(range._startNode);
+}
+exports.range_root = range_root;
+/**
+ * Determines if a node is fully contained in a range.
+ *
+ * @param node - a node
+ * @param range - a range
+ */
+function range_isContained(node, range) {
+ /**
+ * A node node is contained in a live range range if node’s root is range’s
+ * root, and (node, 0) is after range’s start, and (node, node’s length) is
+ * before range’s end.
+ */
+ return (TreeAlgorithm_1.tree_rootNode(node) === range_root(range) &&
+ BoundaryPointAlgorithm_1.boundaryPoint_position([node, 0], range._start) === interfaces_1.BoundaryPosition.After &&
+ BoundaryPointAlgorithm_1.boundaryPoint_position([node, TreeAlgorithm_1.tree_nodeLength(node)], range._end) === interfaces_1.BoundaryPosition.Before);
+}
+exports.range_isContained = range_isContained;
+/**
+ * Determines if a node is partially contained in a range.
+ *
+ * @param node - a node
+ * @param range - a range
+ */
+function range_isPartiallyContained(node, range) {
+ /**
+ * A node is partially contained in a live range if it’s an inclusive
+ * ancestor of the live range’s start node but not its end node,
+ * or vice versa.
+ */
+ var startCheck = TreeAlgorithm_1.tree_isAncestorOf(range._startNode, node, true);
+ var endCheck = TreeAlgorithm_1.tree_isAncestorOf(range._endNode, node, true);
+ return (startCheck && !endCheck) || (!startCheck && endCheck);
+}
+exports.range_isPartiallyContained = range_isPartiallyContained;
+/**
+ * Sets the start boundary point of a range.
+ *
+ * @param range - a range
+ * @param node - a node
+ * @param offset - an offset into node
+ */
+function range_setTheStart(range, node, offset) {
+ /**
+ * 1. If node is a doctype, then throw an "InvalidNodeTypeError" DOMException.
+ * 2. If offset is greater than node’s length, then throw an "IndexSizeError"
+ * DOMException.
+ * 3. Let bp be the boundary point (node, offset).
+ * 4. If these steps were invoked as "set the start"
+ * 4.1. If bp is after the range’s end, or if range’s root is not equal to
+ * node’s root, set range’s end to bp.
+ * 4.2. Set range’s start to bp.
+ */
+ if (util_1.Guard.isDocumentTypeNode(node)) {
+ throw new DOMException_1.InvalidNodeTypeError();
+ }
+ if (offset > TreeAlgorithm_1.tree_nodeLength(node)) {
+ throw new DOMException_1.IndexSizeError();
+ }
+ var bp = [node, offset];
+ if (range_root(range) !== TreeAlgorithm_1.tree_rootNode(node) ||
+ BoundaryPointAlgorithm_1.boundaryPoint_position(bp, range._end) === interfaces_1.BoundaryPosition.After) {
+ range._end = bp;
+ }
+ range._start = bp;
+}
+exports.range_setTheStart = range_setTheStart;
+/**
+ * Sets the end boundary point of a range.
+ *
+ * @param range - a range
+ * @param node - a node
+ * @param offset - an offset into node
+ */
+function range_setTheEnd(range, node, offset) {
+ /**
+ * 1. If node is a doctype, then throw an "InvalidNodeTypeError" DOMException.
+ * 2. If offset is greater than node’s length, then throw an "IndexSizeError"
+ * DOMException.
+ * 3. Let bp be the boundary point (node, offset).
+ * 4. If these steps were invoked as "set the end"
+ * 4.1. If bp is before the range’s start, or if range’s root is not equal
+ * to node’s root, set range’s start to bp.
+ * 4.2. Set range’s end to bp.
+ */
+ if (util_1.Guard.isDocumentTypeNode(node)) {
+ throw new DOMException_1.InvalidNodeTypeError();
+ }
+ if (offset > TreeAlgorithm_1.tree_nodeLength(node)) {
+ throw new DOMException_1.IndexSizeError();
+ }
+ var bp = [node, offset];
+ if (range_root(range) !== TreeAlgorithm_1.tree_rootNode(node) ||
+ BoundaryPointAlgorithm_1.boundaryPoint_position(bp, range._start) === interfaces_1.BoundaryPosition.Before) {
+ range._start = bp;
+ }
+ range._end = bp;
+}
+exports.range_setTheEnd = range_setTheEnd;
+/**
+ * Selects a node.
+ *
+ * @param range - a range
+ * @param node - a node
+ */
+function range_select(node, range) {
+ /**
+ * 1. Let parent be node’s parent.
+ * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException.
+ */
+ var parent = node._parent;
+ if (parent === null)
+ throw new DOMException_1.InvalidNodeTypeError();
+ /**
+ * 3. Let index be node’s index.
+ * 4. Set range’s start to boundary point (parent, index).
+ * 5. Set range’s end to boundary point (parent, index plus 1).
+ */
+ var index = TreeAlgorithm_1.tree_index(node);
+ range._start = [parent, index];
+ range._end = [parent, index + 1];
+}
+exports.range_select = range_select;
+/**
+ * EXtracts the contents of range as a document fragment.
+ *
+ * @param range - a range
+ */
+function range_extract(range) {
+ var e_1, _a, e_2, _b, e_3, _c;
+ /**
+ * 1. Let fragment be a new DocumentFragment node whose node document is
+ * range’s start node’s node document.
+ * 2. If range is collapsed, then return fragment.
+ */
+ var fragment = CreateAlgorithm_1.create_documentFragment(range._startNode._nodeDocument);
+ if (range_collapsed(range))
+ return fragment;
+ /**
+ * 3. Let original start node, original start offset, original end node,
+ * and original end offset be range’s start node, start offset, end node,
+ * and end offset, respectively.
+ */
+ var originalStartNode = range._startNode;
+ var originalStartOffset = range._startOffset;
+ var originalEndNode = range._endNode;
+ var originalEndOffset = range._endOffset;
+ /**
+ * 4. If original start node is original end node, and they are a Text,
+ * ProcessingInstruction, or Comment node:
+ * 4.1. Let clone be a clone of original start node.
+ * 4.2. Set the data of clone to the result of substringing data with node
+ * original start node, offset original start offset, and count original end
+ * offset minus original start offset.
+ * 4.3. Append clone to fragment.
+ * 4.4. Replace data with node original start node, offset original start
+ * offset, count original end offset minus original start offset, and data
+ * the empty string.
+ * 4.5. Return fragment.
+ */
+ if (originalStartNode === originalEndNode &&
+ util_1.Guard.isCharacterDataNode(originalStartNode)) {
+ var clone = NodeAlgorithm_1.node_clone(originalStartNode);
+ clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalStartNode, originalStartOffset, originalEndOffset - originalStartOffset);
+ MutationAlgorithm_1.mutation_append(clone, fragment);
+ CharacterDataAlgorithm_1.characterData_replaceData(originalStartNode, originalStartOffset, originalEndOffset - originalStartOffset, '');
+ return fragment;
+ }
+ /**
+ * 5. Let common ancestor be original start node.
+ * 6. While common ancestor is not an inclusive ancestor of original end
+ * node, set common ancestor to its own parent.
+ */
+ var commonAncestor = originalStartNode;
+ while (!TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, commonAncestor, true)) {
+ if (commonAncestor._parent === null) {
+ throw new Error("Parent node is null.");
+ }
+ commonAncestor = commonAncestor._parent;
+ }
+ /**
+ * 7. Let first partially contained child be null.
+ * 8. If original start node is not an inclusive ancestor of original end
+ * node, set first partially contained child to the first child of common
+ * ancestor that is partially contained in range.
+ */
+ var firstPartiallyContainedChild = null;
+ if (!TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, originalStartNode, true)) {
+ try {
+ for (var _d = __values(commonAncestor._children), _e = _d.next(); !_e.done; _e = _d.next()) {
+ var node = _e.value;
+ if (range_isPartiallyContained(node, range)) {
+ firstPartiallyContainedChild = node;
+ break;
+ }
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ }
+ /**
+ * 9. Let last partially contained child be null.
+ * 10. If original end node is not an inclusive ancestor of original start
+ * node, set last partially contained child to the last child of common
+ * ancestor that is partially contained in range.
+ */
+ var lastPartiallyContainedChild = null;
+ if (!TreeAlgorithm_1.tree_isAncestorOf(originalStartNode, originalEndNode, true)) {
+ var children = __spread(commonAncestor._children);
+ for (var i = children.length - 1; i > 0; i--) {
+ var node = children[i];
+ if (range_isPartiallyContained(node, range)) {
+ lastPartiallyContainedChild = node;
+ break;
+ }
+ }
+ }
+ /**
+ * 11. Let contained children be a list of all children of common ancestor
+ * that are contained in range, in tree order.
+ * 12. If any member of contained children is a doctype, then throw a
+ * "HierarchyRequestError" DOMException.
+ */
+ var containedChildren = [];
+ try {
+ for (var _f = __values(commonAncestor._children), _g = _f.next(); !_g.done; _g = _f.next()) {
+ var child = _g.value;
+ if (range_isContained(child, range)) {
+ if (util_1.Guard.isDocumentTypeNode(child)) {
+ throw new DOMException_1.HierarchyRequestError();
+ }
+ containedChildren.push(child);
+ }
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ var newNode;
+ var newOffset;
+ if (TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, originalStartNode, true)) {
+ /**
+ * 13. If original start node is an inclusive ancestor of original end node,
+ * set new node to original start node and new offset to original start
+ * offset.
+ */
+ newNode = originalStartNode;
+ newOffset = originalStartOffset;
+ }
+ else {
+ /**
+ * 14. Otherwise:
+ * 14.1. Let reference node equal original start node.
+ * 14.2. While reference node’s parent is not null and is not an inclusive
+ * ancestor of original end node, set reference node to its parent.
+ * 14.3. Set new node to the parent of reference node, and new offset to
+ * one plus reference node’s index.
+ */
+ var referenceNode = originalStartNode;
+ while (referenceNode._parent !== null &&
+ !TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, referenceNode._parent)) {
+ referenceNode = referenceNode._parent;
+ }
+ /* istanbul ignore next */
+ if (referenceNode._parent === null) {
+ /**
+ * If reference node’s parent is null, it would be the root of range,
+ * so would be an inclusive ancestor of original end node, and we could
+ * not reach this point.
+ */
+ throw new Error("Parent node is null.");
+ }
+ newNode = referenceNode._parent;
+ newOffset = 1 + TreeAlgorithm_1.tree_index(referenceNode);
+ }
+ if (util_1.Guard.isCharacterDataNode(firstPartiallyContainedChild)) {
+ /**
+ * 15. If first partially contained child is a Text, ProcessingInstruction,
+ * or Comment node:
+ * 15.1. Let clone be a clone of original start node.
+ * 15.2. Set the data of clone to the result of substringing data with
+ * node original start node, offset original start offset, and count
+ * original start node’s length minus original start offset.
+ * 15.3. Append clone to fragment.
+ * 15.4. Replace data with node original start node, offset original
+ * start offset, count original start node’s length minus original start
+ * offset, and data the empty string.
+ */
+ var clone = NodeAlgorithm_1.node_clone(originalStartNode);
+ clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalStartNode, originalStartOffset, TreeAlgorithm_1.tree_nodeLength(originalStartNode) - originalStartOffset);
+ MutationAlgorithm_1.mutation_append(clone, fragment);
+ CharacterDataAlgorithm_1.characterData_replaceData(originalStartNode, originalStartOffset, TreeAlgorithm_1.tree_nodeLength(originalStartNode) - originalStartOffset, '');
+ }
+ else if (firstPartiallyContainedChild !== null) {
+ /**
+ * 16. Otherwise, if first partially contained child is not null:
+ * 16.1. Let clone be a clone of first partially contained child.
+ * 16.2. Append clone to fragment.
+ * 16.3. Let subrange be a new live range whose start is (original start
+ * node, original start offset) and whose end is (first partially
+ * contained child, first partially contained child’s length).
+ * 16.4. Let subfragment be the result of extracting subrange.
+ * 16.5. Append subfragment to clone.
+ */
+ var clone = NodeAlgorithm_1.node_clone(firstPartiallyContainedChild);
+ MutationAlgorithm_1.mutation_append(clone, fragment);
+ var subrange = CreateAlgorithm_1.create_range([originalStartNode, originalStartOffset], [firstPartiallyContainedChild, TreeAlgorithm_1.tree_nodeLength(firstPartiallyContainedChild)]);
+ var subfragment = range_extract(subrange);
+ MutationAlgorithm_1.mutation_append(subfragment, clone);
+ }
+ try {
+ /**
+ * 17. For each contained child in contained children, append contained
+ * child to fragment.
+ */
+ for (var containedChildren_1 = __values(containedChildren), containedChildren_1_1 = containedChildren_1.next(); !containedChildren_1_1.done; containedChildren_1_1 = containedChildren_1.next()) {
+ var child = containedChildren_1_1.value;
+ MutationAlgorithm_1.mutation_append(child, fragment);
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (containedChildren_1_1 && !containedChildren_1_1.done && (_c = containedChildren_1.return)) _c.call(containedChildren_1);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ if (util_1.Guard.isCharacterDataNode(lastPartiallyContainedChild)) {
+ /**
+ * 18. If last partially contained child is a Text, ProcessingInstruction,
+ * or Comment node:
+ * 18.1. Let clone be a clone of original end node.
+ * 18.2. Set the data of clone to the result of substringing data with
+ * node original end node, offset 0, and count original end offset.
+ * 18.3. Append clone to fragment.
+ * 18.4. Replace data with node original end node, offset 0, count
+ * original end offset, and data the empty string.
+ */
+ var clone = NodeAlgorithm_1.node_clone(originalEndNode);
+ clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalEndNode, 0, originalEndOffset);
+ MutationAlgorithm_1.mutation_append(clone, fragment);
+ CharacterDataAlgorithm_1.characterData_replaceData(originalEndNode, 0, originalEndOffset, '');
+ }
+ else if (lastPartiallyContainedChild !== null) {
+ /**
+ * 19. Otherwise, if last partially contained child is not null:
+ * 19.1. Let clone be a clone of last partially contained child.
+ * 19.2. Append clone to fragment.
+ * 19.3. Let subrange be a new live range whose start is (last partially
+ * contained child, 0) and whose end is (original end node, original
+ * end offset).
+ * 19.4. Let subfragment be the result of extracting subrange.
+ * 19.5. Append subfragment to clone.
+ */
+ var clone = NodeAlgorithm_1.node_clone(lastPartiallyContainedChild);
+ MutationAlgorithm_1.mutation_append(clone, fragment);
+ var subrange = CreateAlgorithm_1.create_range([lastPartiallyContainedChild, 0], [originalEndNode, originalEndOffset]);
+ var subfragment = range_extract(subrange);
+ MutationAlgorithm_1.mutation_append(subfragment, clone);
+ }
+ /**
+ * 20. Set range’s start and end to (new node, new offset).
+ */
+ range._start = [newNode, newOffset];
+ range._end = [newNode, newOffset];
+ /**
+ * 21. Return fragment.
+ */
+ return fragment;
+}
+exports.range_extract = range_extract;
+/**
+ * Clones the contents of range as a document fragment.
+ *
+ * @param range - a range
+ */
+function range_cloneTheContents(range) {
+ var e_4, _a, e_5, _b, e_6, _c;
+ /**
+ * 1. Let fragment be a new DocumentFragment node whose node document
+ * is range’s start node’s node document.
+ * 2. If range is collapsed, then return fragment.
+ */
+ var fragment = CreateAlgorithm_1.create_documentFragment(range._startNode._nodeDocument);
+ if (range_collapsed(range))
+ return fragment;
+ /**
+ * 3. Let original start node, original start offset, original end node,
+ * and original end offset be range’s start node, start offset, end node,
+ * and end offset, respectively.
+ * 4. If original start node is original end node, and they are a Text,
+ * ProcessingInstruction, or Comment node:
+ * 4.1. Let clone be a clone of original start node.
+ * 4.2. Set the data of clone to the result of substringing data with node
+ * original start node, offset original start offset, and count original end
+ * offset minus original start offset.
+ * 4.3. Append clone to fragment.
+ * 4.5. Return fragment.
+ */
+ var originalStartNode = range._startNode;
+ var originalStartOffset = range._startOffset;
+ var originalEndNode = range._endNode;
+ var originalEndOffset = range._endOffset;
+ if (originalStartNode === originalEndNode &&
+ util_1.Guard.isCharacterDataNode(originalStartNode)) {
+ var clone = NodeAlgorithm_1.node_clone(originalStartNode);
+ clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalStartNode, originalStartOffset, originalEndOffset - originalStartOffset);
+ MutationAlgorithm_1.mutation_append(clone, fragment);
+ }
+ /**
+ * 5. Let common ancestor be original start node.
+ * 6. While common ancestor is not an inclusive ancestor of original end
+ * node, set common ancestor to its own parent.
+ */
+ var commonAncestor = originalStartNode;
+ while (!TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, commonAncestor, true)) {
+ if (commonAncestor._parent === null) {
+ throw new Error("Parent node is null.");
+ }
+ commonAncestor = commonAncestor._parent;
+ }
+ /**
+ * 7. Let first partially contained child be null.
+ * 8. If original start node is not an inclusive ancestor of original end
+ * node, set first partially contained child to the first child of common
+ * ancestor that is partially contained in range.
+ */
+ var firstPartiallyContainedChild = null;
+ if (!TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, originalStartNode, true)) {
+ try {
+ for (var _d = __values(commonAncestor._children), _e = _d.next(); !_e.done; _e = _d.next()) {
+ var node = _e.value;
+ if (range_isPartiallyContained(node, range)) {
+ firstPartiallyContainedChild = node;
+ break;
+ }
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+ }
+ /**
+ * 9. Let last partially contained child be null.
+ * 10. If original end node is not an inclusive ancestor of original start
+ * node, set last partially contained child to the last child of common
+ * ancestor that is partially contained in range.
+ */
+ var lastPartiallyContainedChild = null;
+ if (!TreeAlgorithm_1.tree_isAncestorOf(originalStartNode, originalEndNode, true)) {
+ var children = __spread(commonAncestor._children);
+ for (var i = children.length - 1; i > 0; i--) {
+ var node = children[i];
+ if (range_isPartiallyContained(node, range)) {
+ lastPartiallyContainedChild = node;
+ break;
+ }
+ }
+ }
+ /**
+ * 11. Let contained children be a list of all children of common ancestor
+ * that are contained in range, in tree order.
+ * 12. If any member of contained children is a doctype, then throw a
+ * "HierarchyRequestError" DOMException.
+ */
+ var containedChildren = [];
+ try {
+ for (var _f = __values(commonAncestor._children), _g = _f.next(); !_g.done; _g = _f.next()) {
+ var child = _g.value;
+ if (range_isContained(child, range)) {
+ if (util_1.Guard.isDocumentTypeNode(child)) {
+ throw new DOMException_1.HierarchyRequestError();
+ }
+ containedChildren.push(child);
+ }
+ }
+ }
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
+ finally {
+ try {
+ if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
+ }
+ finally { if (e_5) throw e_5.error; }
+ }
+ if (util_1.Guard.isCharacterDataNode(firstPartiallyContainedChild)) {
+ /**
+ * 13. If first partially contained child is a Text, ProcessingInstruction,
+ * or Comment node:
+ * 13.1. Let clone be a clone of original start node.
+ * 13.2. Set the data of clone to the result of substringing data with
+ * node original start node, offset original start offset, and count
+ * original start node’s length minus original start offset.
+ * 13.3. Append clone to fragment.
+ */
+ var clone = NodeAlgorithm_1.node_clone(originalStartNode);
+ clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalStartNode, originalStartOffset, TreeAlgorithm_1.tree_nodeLength(originalStartNode) - originalStartOffset);
+ MutationAlgorithm_1.mutation_append(clone, fragment);
+ }
+ else if (firstPartiallyContainedChild !== null) {
+ /**
+ * 14. Otherwise, if first partially contained child is not null:
+ * 14.1. Let clone be a clone of first partially contained child.
+ * 14.2. Append clone to fragment.
+ * 14.3. Let subrange be a new live range whose start is (original start
+ * node, original start offset) and whose end is (first partially
+ * contained child, first partially contained child’s length).
+ * 14.4. Let subfragment be the result of cloning the contents of
+ * subrange.
+ * 14.5. Append subfragment to clone.
+ */
+ var clone = NodeAlgorithm_1.node_clone(firstPartiallyContainedChild);
+ MutationAlgorithm_1.mutation_append(clone, fragment);
+ var subrange = CreateAlgorithm_1.create_range([originalStartNode, originalStartOffset], [firstPartiallyContainedChild, TreeAlgorithm_1.tree_nodeLength(firstPartiallyContainedChild)]);
+ var subfragment = range_cloneTheContents(subrange);
+ MutationAlgorithm_1.mutation_append(subfragment, clone);
+ }
+ try {
+ /**
+ * 15. For each contained child in contained children, append contained
+ * child to fragment.
+ * 15.1. Let clone be a clone of contained child with the clone children
+ * flag set.
+ * 15.2. Append clone to fragment.
+ */
+ for (var containedChildren_2 = __values(containedChildren), containedChildren_2_1 = containedChildren_2.next(); !containedChildren_2_1.done; containedChildren_2_1 = containedChildren_2.next()) {
+ var child = containedChildren_2_1.value;
+ var clone = NodeAlgorithm_1.node_clone(child);
+ MutationAlgorithm_1.mutation_append(clone, fragment);
+ }
+ }
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
+ finally {
+ try {
+ if (containedChildren_2_1 && !containedChildren_2_1.done && (_c = containedChildren_2.return)) _c.call(containedChildren_2);
+ }
+ finally { if (e_6) throw e_6.error; }
+ }
+ if (util_1.Guard.isCharacterDataNode(lastPartiallyContainedChild)) {
+ /**
+ * 16. If last partially contained child is a Text, ProcessingInstruction,
+ * or Comment node:
+ * 16.1. Let clone be a clone of original end node.
+ * 16.2. Set the data of clone to the result of substringing data with
+ * node original end node, offset 0, and count original end offset.
+ * 16.3. Append clone to fragment.
+ */
+ var clone = NodeAlgorithm_1.node_clone(originalEndNode);
+ clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalEndNode, 0, originalEndOffset);
+ MutationAlgorithm_1.mutation_append(clone, fragment);
+ }
+ else if (lastPartiallyContainedChild !== null) {
+ /**
+ * 17. Otherwise, if last partially contained child is not null:
+ * 17.1. Let clone be a clone of last partially contained child.
+ * 17.2. Append clone to fragment.
+ * 17.3. Let subrange be a new live range whose start is (last partially
+ * contained child, 0) and whose end is (original end node, original
+ * end offset).
+ * 17.4. Let subfragment be the result of cloning the contents of subrange.
+ * 17.5. Append subfragment to clone.
+ */
+ var clone = NodeAlgorithm_1.node_clone(lastPartiallyContainedChild);
+ fragment.append(clone);
+ var subrange = CreateAlgorithm_1.create_range([lastPartiallyContainedChild, 0], [originalEndNode, originalEndOffset]);
+ var subfragment = range_extract(subrange);
+ MutationAlgorithm_1.mutation_append(subfragment, clone);
+ }
+ /**
+ * 18. Return fragment.
+ */
+ return fragment;
+}
+exports.range_cloneTheContents = range_cloneTheContents;
+/**
+ * Inserts a node into a range at the start boundary point.
+ *
+ * @param node - node to insert
+ * @param range - a range
+ */
+function range_insert(node, range) {
+ var e_7, _a;
+ /**
+ * 1. If range’s start node is a ProcessingInstruction or Comment node, is a
+ * Text node whose parent is null, or is node, then throw a
+ * "HierarchyRequestError" DOMException.
+ */
+ if (util_1.Guard.isProcessingInstructionNode(range._startNode) ||
+ util_1.Guard.isCommentNode(range._startNode) ||
+ (util_1.Guard.isTextNode(range._startNode) && range._startNode._parent === null) ||
+ range._startNode === node) {
+ throw new DOMException_1.HierarchyRequestError();
+ }
+ /**
+ * 2. Let referenceNode be null.
+ * 3. If range’s start node is a Text node, set referenceNode to that Text
+ * node.
+ * 4. Otherwise, set referenceNode to the child of start node whose index is
+ * start offset, and null if there is no such child.
+ */
+ var referenceNode = null;
+ if (util_1.Guard.isTextNode(range._startNode)) {
+ referenceNode = range._startNode;
+ }
+ else {
+ var index = 0;
+ try {
+ for (var _b = __values(range._startNode._children), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var child = _c.value;
+ if (index === range._startOffset) {
+ referenceNode = child;
+ break;
+ }
+ index++;
+ }
+ }
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_7) throw e_7.error; }
+ }
+ }
+ /**
+ * 5. Let parent be range’s start node if referenceNode is null, and
+ * referenceNode’s parent otherwise.
+ */
+ var parent;
+ if (referenceNode === null) {
+ parent = range._startNode;
+ }
+ else {
+ if (referenceNode._parent === null) {
+ throw new Error("Parent node is null.");
+ }
+ parent = referenceNode._parent;
+ }
+ /**
+ * 6. Ensure pre-insertion validity of node into parent before referenceNode.
+ */
+ MutationAlgorithm_1.mutation_ensurePreInsertionValidity(node, parent, referenceNode);
+ /**
+ * 7. If range’s start node is a Text node, set referenceNode to the result
+ * of splitting it with offset range’s start offset.
+ */
+ if (util_1.Guard.isTextNode(range._startNode)) {
+ referenceNode = TextAlgorithm_1.text_split(range._startNode, range._startOffset);
+ }
+ /**
+ * 8. If node is referenceNode, set referenceNode to its next sibling.
+ */
+ if (node === referenceNode) {
+ referenceNode = node._nextSibling;
+ }
+ /**
+ * 9. If node’s parent is not null, remove node from its parent.
+ */
+ if (node._parent !== null) {
+ MutationAlgorithm_1.mutation_remove(node, node._parent);
+ }
+ /**
+ * 10. Let newOffset be parent’s length if referenceNode is null, and
+ * referenceNode’s index otherwise.
+ */
+ var newOffset = (referenceNode === null ?
+ TreeAlgorithm_1.tree_nodeLength(parent) : TreeAlgorithm_1.tree_index(referenceNode));
+ /**
+ * 11. Increase newOffset by node’s length if node is a DocumentFragment
+ * node, and one otherwise.
+ */
+ if (util_1.Guard.isDocumentFragmentNode(node)) {
+ newOffset += TreeAlgorithm_1.tree_nodeLength(node);
+ }
+ else {
+ newOffset++;
+ }
+ /**
+ * 12. Pre-insert node into parent before referenceNode.
+ */
+ MutationAlgorithm_1.mutation_preInsert(node, parent, referenceNode);
+ /**
+ * 13. If range is collapsed, then set range’s end to (parent, newOffset).
+ */
+ if (range_collapsed(range)) {
+ range._end = [parent, newOffset];
+ }
+}
+exports.range_insert = range_insert;
+/**
+ * Traverses through all contained nodes of a range.
+ *
+ * @param range - a range
+ */
+function range_getContainedNodes(range) {
+ var _a;
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var container = range.commonAncestorContainer;
+ var currentNode = TreeAlgorithm_1.tree_getFirstDescendantNode(container);
+ return {
+ next: function () {
+ while (currentNode && !range_isContained(currentNode, range)) {
+ currentNode = TreeAlgorithm_1.tree_getNextDescendantNode(container, currentNode);
+ }
+ if (currentNode === null) {
+ return { done: true, value: null };
+ }
+ else {
+ var result = { done: false, value: currentNode };
+ currentNode = TreeAlgorithm_1.tree_getNextDescendantNode(container, currentNode);
+ return result;
+ }
+ }
+ };
+ },
+ _a;
+}
+exports.range_getContainedNodes = range_getContainedNodes;
+/**
+ * Traverses through all partially contained nodes of a range.
+ *
+ * @param range - a range
+ */
+function range_getPartiallyContainedNodes(range) {
+ var _a;
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var container = range.commonAncestorContainer;
+ var currentNode = TreeAlgorithm_1.tree_getFirstDescendantNode(container);
+ return {
+ next: function () {
+ while (currentNode && !range_isPartiallyContained(currentNode, range)) {
+ currentNode = TreeAlgorithm_1.tree_getNextDescendantNode(container, currentNode);
+ }
+ if (currentNode === null) {
+ return { done: true, value: null };
+ }
+ else {
+ var result = { done: false, value: currentNode };
+ currentNode = TreeAlgorithm_1.tree_getNextDescendantNode(container, currentNode);
+ return result;
+ }
+ }
+ };
+ },
+ _a;
+}
+exports.range_getPartiallyContainedNodes = range_getPartiallyContainedNodes;
+//# sourceMappingURL=RangeAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js.map
new file mode 100644
index 0000000..085dd7a
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"RangeAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/RangeAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAG0B;AAC1B,oDAE4B;AAC5B,gCAA+B;AAC/B,qDAAyE;AACzE,iDAGwB;AACxB,mEAAiE;AACjE,mEAAiG;AACjG,iDAA4C;AAC5C,yDAG4B;AAC5B,iDAA4C;AAE5C;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,KAAoB;IAClD;;OAEG;IACH,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,YAAY,KAAK,KAAK,CAAC,UAAU,CAAC,CAAA;AACzF,CAAC;AALD,0CAKC;AAED;;;;GAIG;AACH,SAAgB,UAAU,CAAC,KAAoB;IAC7C;;OAEG;IACH,OAAO,6BAAa,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;AACxC,CAAC;AALD,gCAKC;AAED;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,IAAU,EAAE,KAAoB;IAChE;;;;OAIG;IACH,OAAO,CAAC,6BAAa,CAAC,IAAI,CAAC,KAAK,UAAU,CAAC,KAAK,CAAC;QAC/C,+CAAsB,CAAC,CAA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,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAA;wBAClD,WAAW,GAAG,0CAA0B,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;wBAChE,OAAO,MAAM,CAAA;qBACd;gBACH,CAAC;aACF,CAAA;QACH,CAAC;WACF;AACH,CAAC;AAxBD,4EAwBC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.d.ts
new file mode 100644
index 0000000..d032daa
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.d.ts
@@ -0,0 +1,8 @@
+import { Element, Node } from "../dom/interfaces";
+/**
+ * Matches elements with the given selectors.
+ *
+ * @param selectors - selectors
+ * @param node - the node to match against
+ */
+export declare function selectors_scopeMatchASelectorsString(selectors: string, node: Node): Element[];
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js
new file mode 100644
index 0000000..306ff02
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js
@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMException_1 = require("../dom/DOMException");
+/**
+ * Matches elements with the given selectors.
+ *
+ * @param selectors - selectors
+ * @param node - the node to match against
+ */
+function selectors_scopeMatchASelectorsString(selectors, node) {
+ /**
+ * TODO: Selectors
+ * 1. Let s be the result of parse a selector selectors. [SELECTORS4]
+ * 2. If s is failure, then throw a "SyntaxError" DOMException.
+ * 3. Return the result of match a selector against a tree with s and node’s
+ * root using scoping root node. [SELECTORS4].
+ */
+ throw new DOMException_1.NotSupportedError();
+}
+exports.selectors_scopeMatchASelectorsString = selectors_scopeMatchASelectorsString;
+//# sourceMappingURL=SelectorsAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js.map
new file mode 100644
index 0000000..d73b38c
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"SelectorsAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/SelectorsAlgorithm.ts"],"names":[],"mappings":";;AAAA,oDAAuD;AAGvD;;;;;GAKG;AAEH,SAAgB,oCAAoC,CAAC,SAAiB,EAAE,IAAU;IAEhF;;;;;;OAMG;IACH,MAAM,IAAI,gCAAiB,EAAE,CAAA;AAC/B,CAAC;AAVD,oFAUC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.d.ts
new file mode 100644
index 0000000..cfabdd8
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.d.ts
@@ -0,0 +1,57 @@
+import { Slotable, Slot, Element, Node } from "../dom/interfaces";
+/**
+ * Signals a slot change to the given slot.
+ *
+ * @param slot - a slot
+ */
+export declare function shadowTree_signalASlotChange(slot: Slot): void;
+/**
+ * Determines whether a the shadow tree of the given element node is
+ * connected to a document node.
+ *
+ * @param element - an element node of the shadow tree
+ */
+export declare function shadowTree_isConnected(element: Element): boolean;
+/**
+ * Determines whether a slotable is assigned.
+ *
+ * @param slotable - a slotable
+ */
+export declare function shadowTree_isAssigned(slotable: Slotable): boolean;
+/**
+ * Finds a slot for the given slotable.
+ *
+ * @param slotable - a slotable
+ * @param openFlag - `true` to search open shadow tree's only
+ */
+export declare function shadowTree_findASlot(slotable: Slotable, openFlag?: boolean): Slot | null;
+/**
+ * Finds slotables for the given slot.
+ *
+ * @param slot - a slot
+ */
+export declare function shadowTree_findSlotables(slot: Slot): Slotable[];
+/**
+ * Finds slotables for the given slot.
+ *
+ * @param slot - a slot
+ */
+export declare function shadowTree_findFlattenedSlotables(slot: Slot): Slotable[];
+/**
+ * Assigns slotables to the given slot.
+ *
+ * @param slot - a slot
+ */
+export declare function shadowTree_assignSlotables(slot: Slot): void;
+/**
+ * Assigns slotables to all nodes of a tree.
+ *
+ * @param root - root node
+ */
+export declare function shadowTree_assignSlotablesForATree(root: Node): void;
+/**
+ * Assigns a slot to a slotables.
+ *
+ * @param slotable - a slotable
+ */
+export declare function shadowTree_assignASlot(slotable: Slotable): void;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js
new file mode 100644
index 0000000..e914830
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js
@@ -0,0 +1,316 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+var __spread = (this && this.__spread) || function () {
+ for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("../dom/DOMImpl");
+var util_1 = require("../util");
+var util_2 = require("@oozcitak/util");
+var TreeAlgorithm_1 = require("./TreeAlgorithm");
+var MutationObserverAlgorithm_1 = require("./MutationObserverAlgorithm");
+/**
+ * Signals a slot change to the given slot.
+ *
+ * @param slot - a slot
+ */
+function shadowTree_signalASlotChange(slot) {
+ /**
+ * 1. Append slot to slot’s relevant agent’s signal slots.
+ * 2. Queue a mutation observer microtask.
+ */
+ var window = DOMImpl_1.dom.window;
+ window._signalSlots.add(slot);
+ MutationObserverAlgorithm_1.observer_queueAMutationObserverMicrotask();
+}
+exports.shadowTree_signalASlotChange = shadowTree_signalASlotChange;
+/**
+ * Determines whether a the shadow tree of the given element node is
+ * connected to a document node.
+ *
+ * @param element - an element node of the shadow tree
+ */
+function shadowTree_isConnected(element) {
+ /**
+ * An element is connected if its shadow-including root is a document.
+ */
+ return util_1.Guard.isDocumentNode(TreeAlgorithm_1.tree_rootNode(element, true));
+}
+exports.shadowTree_isConnected = shadowTree_isConnected;
+/**
+ * Determines whether a slotable is assigned.
+ *
+ * @param slotable - a slotable
+ */
+function shadowTree_isAssigned(slotable) {
+ /**
+ * A slotable is assigned if its assigned slot is non-null.
+ */
+ return (slotable._assignedSlot !== null);
+}
+exports.shadowTree_isAssigned = shadowTree_isAssigned;
+/**
+ * Finds a slot for the given slotable.
+ *
+ * @param slotable - a slotable
+ * @param openFlag - `true` to search open shadow tree's only
+ */
+function shadowTree_findASlot(slotable, openFlag) {
+ if (openFlag === void 0) { openFlag = false; }
+ /**
+ * 1. If slotable’s parent is null, then return null.
+ * 2. Let shadow be slotable’s parent’s shadow root.
+ * 3. If shadow is null, then return null.
+ * 4. If the open flag is set and shadow’s mode is not "open", then
+ * return null.
+ * 5. Return the first slot in tree order in shadow’s descendants whose name
+ * is slotable’s name, if any, and null otherwise.
+ */
+ var node = util_1.Cast.asNode(slotable);
+ var parent = node._parent;
+ if (parent === null)
+ return null;
+ var shadow = parent._shadowRoot || null;
+ if (shadow === null)
+ return null;
+ if (openFlag && shadow._mode !== "open")
+ return null;
+ var child = TreeAlgorithm_1.tree_getFirstDescendantNode(shadow, false, true, function (e) { return util_1.Guard.isSlot(e); });
+ while (child !== null) {
+ if (child._name === slotable._name)
+ return child;
+ child = TreeAlgorithm_1.tree_getNextDescendantNode(shadow, child, false, true, function (e) { return util_1.Guard.isSlot(e); });
+ }
+ return null;
+}
+exports.shadowTree_findASlot = shadowTree_findASlot;
+/**
+ * Finds slotables for the given slot.
+ *
+ * @param slot - a slot
+ */
+function shadowTree_findSlotables(slot) {
+ var e_1, _a;
+ /**
+ * 1. Let result be an empty list.
+ * 2. If slot’s root is not a shadow root, then return result.
+ */
+ var result = [];
+ var root = TreeAlgorithm_1.tree_rootNode(slot);
+ if (!util_1.Guard.isShadowRoot(root))
+ return result;
+ /**
+ * 3. Let host be slot’s root’s host.
+ * 4. For each slotable child of host, slotable, in tree order:
+ */
+ var host = root._host;
+ try {
+ for (var _b = __values(host._children), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var slotable = _c.value;
+ if (util_1.Guard.isSlotable(slotable)) {
+ /**
+ * 4.1. Let foundSlot be the result of finding a slot given slotable.
+ * 4.2. If foundSlot is slot, then append slotable to result.
+ */
+ var foundSlot = shadowTree_findASlot(slotable);
+ if (foundSlot === slot) {
+ result.push(slotable);
+ }
+ }
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ /**
+ * 5. Return result.
+ */
+ return result;
+}
+exports.shadowTree_findSlotables = shadowTree_findSlotables;
+/**
+ * Finds slotables for the given slot.
+ *
+ * @param slot - a slot
+ */
+function shadowTree_findFlattenedSlotables(slot) {
+ var e_2, _a, e_3, _b;
+ /**
+ * 1. Let result be an empty list.
+ * 2. If slot’s root is not a shadow root, then return result.
+ */
+ var result = [];
+ var root = TreeAlgorithm_1.tree_rootNode(slot);
+ if (!util_1.Guard.isShadowRoot(root))
+ return result;
+ /**
+ * 3. Let slotables be the result of finding slotables given slot.
+ * 4. If slotables is the empty list, then append each slotable child of
+ * slot, in tree order, to slotables.
+ */
+ var slotables = shadowTree_findSlotables(slot);
+ if (util_2.isEmpty(slotables)) {
+ try {
+ for (var _c = __values(slot._children), _d = _c.next(); !_d.done; _d = _c.next()) {
+ var slotable = _d.value;
+ if (util_1.Guard.isSlotable(slotable)) {
+ slotables.push(slotable);
+ }
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ }
+ try {
+ /**
+ * 5. For each node in slotables:
+ */
+ for (var slotables_1 = __values(slotables), slotables_1_1 = slotables_1.next(); !slotables_1_1.done; slotables_1_1 = slotables_1.next()) {
+ var node = slotables_1_1.value;
+ /**
+ * 5.1. If node is a slot whose root is a shadow root, then:
+ */
+ if (util_1.Guard.isSlot(node) && util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(node))) {
+ /**
+ * 5.1.1. Let temporaryResult be the result of finding flattened slotables given node.
+ * 5.1.2. Append each slotable in temporaryResult, in order, to result.
+ */
+ var temporaryResult = shadowTree_findFlattenedSlotables(node);
+ result.push.apply(result, __spread(temporaryResult));
+ }
+ else {
+ /**
+ * 5.2. Otherwise, append node to result.
+ */
+ result.push(node);
+ }
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (slotables_1_1 && !slotables_1_1.done && (_b = slotables_1.return)) _b.call(slotables_1);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ /**
+ * 6. Return result.
+ */
+ return result;
+}
+exports.shadowTree_findFlattenedSlotables = shadowTree_findFlattenedSlotables;
+/**
+ * Assigns slotables to the given slot.
+ *
+ * @param slot - a slot
+ */
+function shadowTree_assignSlotables(slot) {
+ var e_4, _a;
+ /**
+ * 1. Let slotables be the result of finding slotables for slot.
+ * 2. If slotables and slot’s assigned nodes are not identical, then run
+ * signal a slot change for slot.
+ */
+ var slotables = shadowTree_findSlotables(slot);
+ if (slotables.length === slot._assignedNodes.length) {
+ var nodesIdentical = true;
+ for (var i = 0; i < slotables.length; i++) {
+ if (slotables[i] !== slot._assignedNodes[i]) {
+ nodesIdentical = false;
+ break;
+ }
+ }
+ if (!nodesIdentical) {
+ shadowTree_signalASlotChange(slot);
+ }
+ }
+ /**
+ * 3. Set slot’s assigned nodes to slotables.
+ * 4. For each slotable in slotables, set slotable’s assigned slot to slot.
+ */
+ slot._assignedNodes = slotables;
+ try {
+ for (var slotables_2 = __values(slotables), slotables_2_1 = slotables_2.next(); !slotables_2_1.done; slotables_2_1 = slotables_2.next()) {
+ var slotable = slotables_2_1.value;
+ slotable._assignedSlot = slot;
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (slotables_2_1 && !slotables_2_1.done && (_a = slotables_2.return)) _a.call(slotables_2);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+}
+exports.shadowTree_assignSlotables = shadowTree_assignSlotables;
+/**
+ * Assigns slotables to all nodes of a tree.
+ *
+ * @param root - root node
+ */
+function shadowTree_assignSlotablesForATree(root) {
+ /**
+ * To assign slotables for a tree, given a node root, run assign slotables
+ * for each slot slot in root’s inclusive descendants, in tree order.
+ */
+ var descendant = TreeAlgorithm_1.tree_getFirstDescendantNode(root, true, false, function (e) { return util_1.Guard.isSlot(e); });
+ while (descendant !== null) {
+ shadowTree_assignSlotables(descendant);
+ descendant = TreeAlgorithm_1.tree_getNextDescendantNode(root, descendant, true, false, function (e) { return util_1.Guard.isSlot(e); });
+ }
+}
+exports.shadowTree_assignSlotablesForATree = shadowTree_assignSlotablesForATree;
+/**
+ * Assigns a slot to a slotables.
+ *
+ * @param slotable - a slotable
+ */
+function shadowTree_assignASlot(slotable) {
+ /**
+ * 1. Let slot be the result of finding a slot with slotable.
+ * 2. If slot is non-null, then run assign slotables for slot.
+ */
+ var slot = shadowTree_findASlot(slotable);
+ if (slot !== null) {
+ shadowTree_assignSlotables(slot);
+ }
+}
+exports.shadowTree_assignASlot = shadowTree_assignASlot;
+//# sourceMappingURL=ShadowTreeAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js.map
new file mode 100644
index 0000000..667ee5e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ShadowTreeAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/ShadowTreeAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAoC;AAEpC,gCAAqC;AACrC,uCAAwC;AACxC,iDAEwB;AACxB,yEAAsF;AAEtF;;;;GAIG;AACH,SAAgB,4BAA4B,CAAC,IAAU;IACrD;;;OAGG;IACH,IAAM,MAAM,GAAG,aAAG,CAAC,MAAM,CAAA;IACzB,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IAC7B,oEAAwC,EAAE,CAAA;AAC5C,CAAC;AARD,oEAQC;AAED;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,OAAgB;IACrD;;OAEG;IACH,OAAO,YAAK,CAAC,cAAc,CAAC,6BAAa,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;AAC3D,CAAC;AALD,wDAKC;AAED;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,QAAkB;IACtD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa,KAAK,IAAI,CAAC,CAAA;AAC1C,CAAC;AALD,sDAKC;AAED;;;;;GAKG;AACH,SAAgB,oBAAoB,CAAC,QAAkB,EAAE,QACxC;IADwC,yBAAA,EAAA,gBACxC;IACf;;;;;;;;OAQG;IACH,IAAM,IAAI,GAAG,WAA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AC9C,UAAU,GAAG,0CAA0B,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,UAAC,CAAO,IAAK,OAAA,YAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CAAA;KACrG;AACH,CAAC;AAVD,gFAUC;AAED;;;;GAIG;AACH,SAAgB,sBAAsB,CAAC,QAAkB;IACvD;;;OAGG;IACH,IAAM,IAAI,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAA;IAC3C,IAAI,IAAI,KAAK,IAAI,EAAE;QACjB,0BAA0B,CAAC,IAAI,CAAC,CAAA;KACjC;AACH,CAAC;AATD,wDASC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.d.ts
new file mode 100644
index 0000000..156ed81
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.d.ts
@@ -0,0 +1,30 @@
+import { Node, Text } from "../dom/interfaces";
+/**
+ * Returns node with its adjacent text and cdata node siblings.
+ *
+ * @param node - a node
+ * @param self - whether to include node itself
+ */
+export declare function text_contiguousTextNodes(node: Text, self?: boolean): Iterable;
+/**
+ * Returns node with its adjacent text node siblings.
+ *
+ * @param node - a node
+ * @param self - whether to include node itself
+ */
+export declare function text_contiguousExclusiveTextNodes(node: Text, self?: boolean): Iterable;
+/**
+ * Returns the concatenation of the data of all the Text node descendants of
+ * node, in tree order.
+ *
+ * @param node - a node
+ */
+export declare function text_descendantTextContent(node: Node): string;
+/**
+ * Splits data at the given offset and returns the remainder as a text
+ * node.
+ *
+ * @param node - a text node
+ * @param offset - the offset at which to split the nodes.
+ */
+export declare function text_split(node: Text, offset: number): Text;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js
new file mode 100644
index 0000000..4115397
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js
@@ -0,0 +1,226 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("../dom/DOMImpl");
+var util_1 = require("../util");
+var DOMException_1 = require("../dom/DOMException");
+var CreateAlgorithm_1 = require("./CreateAlgorithm");
+var TreeAlgorithm_1 = require("./TreeAlgorithm");
+var CharacterDataAlgorithm_1 = require("./CharacterDataAlgorithm");
+var MutationAlgorithm_1 = require("./MutationAlgorithm");
+/**
+ * Returns node with its adjacent text and cdata node siblings.
+ *
+ * @param node - a node
+ * @param self - whether to include node itself
+ */
+function text_contiguousTextNodes(node, self) {
+ var _a;
+ if (self === void 0) { self = false; }
+ /**
+ * The contiguous Text nodes of a node node are node, node’s previous
+ * sibling Text node, if any, and its contiguous Text nodes, and node’s next
+ * sibling Text node, if any, and its contiguous Text nodes, avoiding any
+ * duplicates.
+ */
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var currentNode = node;
+ while (currentNode && util_1.Guard.isTextNode(currentNode._previousSibling)) {
+ currentNode = currentNode._previousSibling;
+ }
+ return {
+ next: function () {
+ if (currentNode && (!self && currentNode === node)) {
+ if (util_1.Guard.isTextNode(currentNode._nextSibling)) {
+ currentNode = currentNode._nextSibling;
+ }
+ else {
+ currentNode = null;
+ }
+ }
+ if (currentNode === null) {
+ return { done: true, value: null };
+ }
+ else {
+ var result = { done: false, value: currentNode };
+ if (util_1.Guard.isTextNode(currentNode._nextSibling)) {
+ currentNode = currentNode._nextSibling;
+ }
+ else {
+ currentNode = null;
+ }
+ return result;
+ }
+ }
+ };
+ },
+ _a;
+}
+exports.text_contiguousTextNodes = text_contiguousTextNodes;
+/**
+ * Returns node with its adjacent text node siblings.
+ *
+ * @param node - a node
+ * @param self - whether to include node itself
+ */
+function text_contiguousExclusiveTextNodes(node, self) {
+ var _a;
+ if (self === void 0) { self = false; }
+ /**
+ * The contiguous exclusive Text nodes of a node node are node, node’s
+ * previous sibling exclusive Text node, if any, and its contiguous
+ * exclusive Text nodes, and node’s next sibling exclusive Text node,
+ * if any, and its contiguous exclusive Text nodes, avoiding any duplicates.
+ */
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var currentNode = node;
+ while (currentNode && util_1.Guard.isExclusiveTextNode(currentNode._previousSibling)) {
+ currentNode = currentNode._previousSibling;
+ }
+ return {
+ next: function () {
+ if (currentNode && (!self && currentNode === node)) {
+ if (util_1.Guard.isExclusiveTextNode(currentNode._nextSibling)) {
+ currentNode = currentNode._nextSibling;
+ }
+ else {
+ currentNode = null;
+ }
+ }
+ if (currentNode === null) {
+ return { done: true, value: null };
+ }
+ else {
+ var result = { done: false, value: currentNode };
+ if (util_1.Guard.isExclusiveTextNode(currentNode._nextSibling)) {
+ currentNode = currentNode._nextSibling;
+ }
+ else {
+ currentNode = null;
+ }
+ return result;
+ }
+ }
+ };
+ },
+ _a;
+}
+exports.text_contiguousExclusiveTextNodes = text_contiguousExclusiveTextNodes;
+/**
+ * Returns the concatenation of the data of all the Text node descendants of
+ * node, in tree order.
+ *
+ * @param node - a node
+ */
+function text_descendantTextContent(node) {
+ /**
+ * The descendant text content of a node node is the concatenation of the
+ * data of all the Text node descendants of node, in tree order.
+ */
+ var contents = '';
+ var text = TreeAlgorithm_1.tree_getFirstDescendantNode(node, false, false, function (e) { return util_1.Guard.isTextNode(e); });
+ while (text !== null) {
+ contents += text._data;
+ text = TreeAlgorithm_1.tree_getNextDescendantNode(node, text, false, false, function (e) { return util_1.Guard.isTextNode(e); });
+ }
+ return contents;
+}
+exports.text_descendantTextContent = text_descendantTextContent;
+/**
+ * Splits data at the given offset and returns the remainder as a text
+ * node.
+ *
+ * @param node - a text node
+ * @param offset - the offset at which to split the nodes.
+ */
+function text_split(node, offset) {
+ var e_1, _a;
+ /**
+ * 1. Let length be node’s length.
+ * 2. If offset is greater than length, then throw an "IndexSizeError"
+ * DOMException.
+ */
+ var length = node._data.length;
+ if (offset > length) {
+ throw new DOMException_1.IndexSizeError();
+ }
+ /**
+ * 3. Let count be length minus offset.
+ * 4. Let new data be the result of substringing data with node node,
+ * offset offset, and count count.
+ * 5. Let new node be a new Text node, with the same node document as node.
+ * Set new node’s data to new data.
+ * 6. Let parent be node’s parent.
+ * 7. If parent is not null, then:
+ */
+ var count = length - offset;
+ var newData = CharacterDataAlgorithm_1.characterData_substringData(node, offset, count);
+ var newNode = CreateAlgorithm_1.create_text(node._nodeDocument, newData);
+ var parent = node._parent;
+ if (parent !== null) {
+ /**
+ * 7.1. Insert new node into parent before node’s next sibling.
+ */
+ MutationAlgorithm_1.mutation_insert(newNode, parent, node._nextSibling);
+ try {
+ /**
+ * 7.2. For each live range whose start node is node and start offset is
+ * greater than offset, set its start node to new node and decrease its
+ * start offset by offset.
+ * 7.3. For each live range whose end node is node and end offset is greater
+ * than offset, set its end node to new node and decrease its end offset
+ * by offset.
+ * 7.4. For each live range whose start node is parent and start offset is
+ * equal to the index of node plus 1, increase its start offset by 1.
+ * 7.5. For each live range whose end node is parent and end offset is equal
+ * to the index of node plus 1, increase its end offset by 1.
+ */
+ for (var _b = __values(DOMImpl_1.dom.rangeList), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var range = _c.value;
+ if (range._start[0] === node && range._start[1] > offset) {
+ range._start[0] = newNode;
+ range._start[1] -= offset;
+ }
+ if (range._end[0] === node && range._end[1] > offset) {
+ range._end[0] = newNode;
+ range._end[1] -= offset;
+ }
+ var index = TreeAlgorithm_1.tree_index(node);
+ if (range._start[0] === parent && range._start[1] === index + 1) {
+ range._start[1]++;
+ }
+ if (range._end[0] === parent && range._end[1] === index + 1) {
+ range._end[1]++;
+ }
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ }
+ /**
+ * 8. Replace data with node node, offset offset, count count, and data
+ * the empty string.
+ * 9. Return new node.
+ */
+ CharacterDataAlgorithm_1.characterData_replaceData(node, offset, count, '');
+ return newNode;
+}
+exports.text_split = text_split;
+//# sourceMappingURL=TextAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js.map
new file mode 100644
index 0000000..aa4fc7d
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"TextAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/TextAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,0CAAoC;AAEpC,gCAA+B;AAC/B,oDAAoD;AACpD,qDAA+C;AAC/C,iDAEwB;AACxB,mEAEiC;AACjC,yDAAqD;AAErD;;;;;GAKG;AACH,SAAgB,wBAAwB,CAAC,IAAU,EAAE,IAAqB;;IAArB,qBAAA,EAAA,YAAqB;IACxE;;;;;OAKG;IACH;QACE,GAAC,MAAM,CAAC,QAAQ,IAAhB;YAEE,IAAI,WAAW,GAAgB,IAAI,CAAA;YACnC,OAAO,WAAW,IAAI,YAAK,CAAC,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE;gBACpE,WAAW,GAAG,WAAW,CAAC,gBAAgB,CAAA;aAC3C;YAED,OAAO;gBACL,IAAI;oBACF,IAAI,WAAW,IAAI,CAAC,CAAC,IAAI,IAAI,WAAW,KAAK,IAAI,CAAC,EAAE;wBAClD,IAAI,YAAK,CAAC,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,EAAE;4BAC9C,WAAW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AAI,CAAC,CAAC,CAAC,KAAK,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,KAAK,GAAG,CAAC,EAAE;oBAC3D,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAA;iBAChB;aACF;;;;;;;;;KACF;IAED;;;;OAIG;IACH,kDAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAA;IAClD,OAAO,OAAO,CAAA;AAChB,CAAC;AApED,gCAoEC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.d.ts
new file mode 100644
index 0000000..bd4cfb8
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.d.ts
@@ -0,0 +1,8 @@
+import { FilterResult, NodeIterator, Node, TreeWalker } from "../dom/interfaces";
+/**
+ * Applies the filter to the given node and returns the result.
+ *
+ * @param traverser - the `NodeIterator` or `TreeWalker` instance
+ * @param node - the node to filter
+ */
+export declare function traversal_filter(traverser: NodeIterator | TreeWalker, node: Node): FilterResult;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js
new file mode 100644
index 0000000..227fe92
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js
@@ -0,0 +1,62 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("../dom/interfaces");
+var DOMException_1 = require("../dom/DOMException");
+/**
+ * Applies the filter to the given node and returns the result.
+ *
+ * @param traverser - the `NodeIterator` or `TreeWalker` instance
+ * @param node - the node to filter
+ */
+function traversal_filter(traverser, node) {
+ /**
+ * 1. If traverser’s active flag is set, then throw an "InvalidStateError"
+ * DOMException.
+ */
+ if (traverser._activeFlag) {
+ throw new DOMException_1.InvalidStateError();
+ }
+ /**
+ * 2. Let n be node’s nodeType attribute value − 1.
+ */
+ var n = node._nodeType - 1;
+ /**
+ * 3. If the nth bit (where 0 is the least significant bit) of traverser’s
+ * whatToShow is not set, then return FILTER_SKIP.
+ */
+ var mask = 1 << n;
+ if ((traverser.whatToShow & mask) === 0) {
+ return interfaces_1.FilterResult.Skip;
+ }
+ /**
+ * 4. If traverser’s filter is null, then return FILTER_ACCEPT.
+ */
+ if (!traverser.filter) {
+ return interfaces_1.FilterResult.Accept;
+ }
+ /**
+ * 5. Set traverser’s active flag.
+ */
+ traverser._activeFlag = true;
+ /**
+ * 6. Let result be the return value of call a user object’s operation with
+ * traverser’s filter, "acceptNode", and « node ». If this throws an
+ * exception, then unset traverser’s active flag and rethrow the exception.
+ */
+ var result = interfaces_1.FilterResult.Reject;
+ try {
+ result = traverser.filter.acceptNode(node);
+ }
+ catch (err) {
+ traverser._activeFlag = false;
+ throw err;
+ }
+ /**
+ * 7. Unset traverser’s active flag.
+ * 8. Return result.
+ */
+ traverser._activeFlag = false;
+ return result;
+}
+exports.traversal_filter = traversal_filter;
+//# sourceMappingURL=TraversalAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js.map
new file mode 100644
index 0000000..62c345b
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"TraversalAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/TraversalAlgorithm.ts"],"names":[],"mappings":";;AAAA,gDAAgF;AAChF,oDAAuD;AAEvD;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,SAAoC,EACnE,IAAU;IACV;;;OAGG;IACH,IAAI,SAAS,CAAC,WAAW,EAAE;QACzB,MAAM,IAAI,gCAAiB,EAAE,CAAA;KAC9B;IAED;;OAEG;IACH,IAAM,CAAC,GAAG,IAAI,CAAC,SAAS,GAAG,CAAC,CAAA;IAE5B;;;OAGG;IACH,IAAM,IAAI,GAAG,CAAC,IAAI,CAAC,CAAA;IACnB,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE;QACvC,OAAO,yBAAY,CAAC,IAAI,CAAA;KACzB;IAED;;OAEG;IACH,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;QACrB,OAAO,yBAAY,CAAC,MAAM,CAAA;KAC3B;IAED;;OAEG;IACH,SAAS,CAAC,WAAW,GAAG,IAAI,CAAA;IAE5B;;;;OAIG;IACH,IAAI,MAAM,GAAG,yBAAY,CAAC,MAAM,CAAA;IAChC,IAAI;QACF,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;KAC3C;IAAC,OAAO,GAAG,EAAE;QACZ,SAAS,CAAC,WAAW,GAAG,KAAK,CAAA;QAC7B,MAAM,GAAG,CAAA;KACV;IAED;;;OAGG;IACH,SAAS,CAAC,WAAW,GAAG,KAAK,CAAA;IAC7B,OAAO,MAAM,CAAA;AACf,CAAC;AAvDD,4CAuDC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.d.ts
new file mode 100644
index 0000000..9f2b8d3
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.d.ts
@@ -0,0 +1,268 @@
+import { Element, Node } from "../dom/interfaces";
+/**
+ * Returns the first descendant node of the tree rooted at `node` in
+ * depth-first pre-order.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param shadow - whether to visit shadow tree nodes
+ * @param filter - a function to filter nodes
+ */
+export declare function tree_getFirstDescendantNode(node: Node, self?: boolean, shadow?: boolean, filter?: ((childNode: Node) => boolean)): Node | null;
+/**
+ * Returns the next descendant node of the tree rooted at `node` in
+ * depth-first pre-order.
+ *
+ * @param node - root node of the tree
+ * @param currentNode - current descendant node
+ * @param self - whether to include `node` in traversal
+ * @param shadow - whether to visit shadow tree nodes
+ * @param filter - a function to filter nodes
+ */
+export declare function tree_getNextDescendantNode(node: Node, currentNode: Node, self?: boolean, shadow?: boolean, filter?: ((childNode: Node) => boolean)): Node | null;
+/**
+ * Traverses through all descendant nodes of the tree rooted at
+ * `node` in depth-first pre-order.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param shadow - whether to visit shadow tree nodes
+ * @param filter - a function to filter nodes
+ */
+export declare function tree_getDescendantNodes(node: Node, self?: boolean, shadow?: boolean, filter?: ((childNode: Node) => boolean)): Iterable;
+/**
+ * Traverses through all descendant element nodes of the tree rooted at
+ * `node` in depth-first preorder.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param shadow - whether to visit shadow tree nodes
+ * @param filter - a function to filter nodes
+ */
+export declare function tree_getDescendantElements(node: Node, self?: boolean, shadow?: boolean, filter?: ((childNode: Element) => boolean)): Iterable;
+/**
+ * Traverses through all sibling nodes of `node`.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param filter - a function to filter nodes
+ */
+export declare function tree_getSiblingNodes(node: Node, self?: boolean, filter?: ((childNode: Node) => boolean)): Iterable;
+/**
+ * Gets the first ancestor of `node` in reverse tree order.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param filter - a function to filter nodes
+ */
+export declare function tree_getFirstAncestorNode(node: Node, self?: boolean, filter?: ((ancestorNode: Node) => boolean)): Node | null;
+/**
+ * Gets the first ancestor of `node` in reverse tree order.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param filter - a function to filter nodes
+ */
+export declare function tree_getNextAncestorNode(node: Node, currentNode: Node, self?: boolean, filter?: ((ancestorNode: Node) => boolean)): Node | null;
+/**
+ * Traverses through all ancestor nodes `node` in reverse tree order.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param filter - a function to filter nodes
+ */
+export declare function tree_getAncestorNodes(node: Node, self?: boolean, filter?: ((ancestorNode: Node) => boolean)): Iterable;
+/**
+ * Returns the common ancestor of the given nodes.
+ *
+ * @param nodeA - a node
+ * @param nodeB - a node
+ */
+export declare function tree_getCommonAncestor(nodeA: Node, nodeB: Node): Node | null;
+/**
+ * Returns the node following `node` in depth-first preorder.
+ *
+ * @param root - root of the subtree
+ * @param node - a node
+ */
+export declare function tree_getFollowingNode(root: Node, node: Node): Node | null;
+/**
+ * Returns the node preceding `node` in depth-first preorder.
+ *
+ * @param root - root of the subtree
+ * @param node - a node
+ */
+export declare function tree_getPrecedingNode(root: Node, node: Node): Node | null;
+/**
+ * Determines if the node tree is constrained. A node tree is
+ * constrained as follows, expressed as a relationship between the
+ * type of node and its allowed children:
+ * - Document (In tree order)
+ * * Zero or more nodes each of which is ProcessingInstruction
+ * or Comment.
+ * * Optionally one DocumentType node.
+ * * Zero or more nodes each of which is ProcessingInstruction
+ * or Comment.
+ * * Optionally one Element node.
+ * * Zero or more nodes each of which is ProcessingInstruction
+ * or Comment.
+ * - DocumentFragment, Element
+ * * Zero or more nodes each of which is Element, Text,
+ * ProcessingInstruction, or Comment.
+ * - DocumentType, Text, ProcessingInstruction, Comment
+ * * None.
+ *
+ * @param node - the root of the tree
+ */
+export declare function tree_isConstrained(node: Node): boolean;
+/**
+ * Returns the length of a node.
+ *
+ * @param node - a node to check
+ */
+export declare function tree_nodeLength(node: Node): number;
+/**
+ * Determines if a node is empty.
+ *
+ * @param node - a node to check
+ */
+export declare function tree_isEmpty(node: Node): boolean;
+/**
+ * Returns the root node of a tree. The root of an object is itself,
+ * if its parent is `null`, or else it is the root of its parent.
+ * The root of a tree is any object participating in that tree
+ * whose parent is `null`.
+ *
+ * @param node - a node of the tree
+ * @param shadow - `true` to return shadow-including root, otherwise
+ * `false`
+ */
+export declare function tree_rootNode(node: Node, shadow?: boolean): Node;
+/**
+ * Determines whether `other` is a descendant of `node`. An object
+ * A is called a descendant of an object B, if either A is a child
+ * of B or A is a child of an object C that is a descendant of B.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ * @param self - if `true`, traversal includes `node` itself
+ * @param shadow - if `true`, traversal includes the
+ * node's and its descendant's shadow trees as well.
+ */
+export declare function tree_isDescendantOf(node: Node, other: Node, self?: boolean, shadow?: boolean): boolean;
+/**
+ * Determines whether `other` is an ancestor of `node`. An object A
+ * is called an ancestor of an object B if and only if B is a
+ * descendant of A.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ * @param self - if `true`, traversal includes `node` itself
+ * @param shadow - if `true`, traversal includes the
+ * node's and its descendant's shadow trees as well.
+ */
+export declare function tree_isAncestorOf(node: Node, other: Node, self?: boolean, shadow?: boolean): boolean;
+/**
+ * Determines whether `other` is a host-including ancestor of `node`. An
+ * object A is a host-including inclusive ancestor of an object B, if either
+ * A is an inclusive ancestor of B, or if B’s root has a non-null host and
+ * A is a host-including inclusive ancestor of B’s root’s host.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ * @param self - if `true`, traversal includes `node` itself
+ */
+export declare function tree_isHostIncludingAncestorOf(node: Node, other: Node, self?: boolean): boolean;
+/**
+ * Determines whether `other` is a sibling of `node`. An object A is
+ * called a sibling of an object B, if and only if B and A share
+ * the same non-null parent.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ * @param self - if `true`, traversal includes `node` itself
+ */
+export declare function tree_isSiblingOf(node: Node, other: Node, self?: boolean): boolean;
+/**
+ * Determines whether `other` is preceding `node`. An object A is
+ * preceding an object B if A and B are in the same tree and A comes
+ * before B in tree order.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ */
+export declare function tree_isPreceding(node: Node, other: Node): boolean;
+/**
+ * Determines whether `other` is following `node`. An object A is
+ * following an object B if A and B are in the same tree and A comes
+ * after B in tree order.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ */
+export declare function tree_isFollowing(node: Node, other: Node): boolean;
+/**
+ * Determines whether `other` is the parent node of `node`.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ */
+export declare function tree_isParentOf(node: Node, other: Node): boolean;
+/**
+ * Determines whether `other` is a child node of `node`.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ */
+export declare function tree_isChildOf(node: Node, other: Node): boolean;
+/**
+ * Returns the previous sibling node of `node` or null if it has no
+ * preceding sibling.
+ *
+ * @param node
+ */
+export declare function tree_previousSibling(node: Node): Node | null;
+/**
+ * Returns the next sibling node of `node` or null if it has no
+ * following sibling.
+ *
+ * @param node
+ */
+export declare function tree_nextSibling(node: Node): Node | null;
+/**
+ * Returns the first child node of `node` or null if it has no
+ * children.
+ *
+ * @param node
+ */
+export declare function tree_firstChild(node: Node): Node | null;
+/**
+ * Returns the last child node of `node` or null if it has no
+ * children.
+ *
+ * @param node
+ */
+export declare function tree_lastChild(node: Node): Node | null;
+/**
+ * Returns the zero-based index of `node` when counted preorder in
+ * the tree rooted at `root`. Returns `-1` if `node` is not in
+ * the tree.
+ *
+ * @param node - the node to get the index of
+ */
+export declare function tree_treePosition(node: Node): number;
+/**
+ * Determines the index of `node`. The index of an object is its number of
+ * preceding siblings, or 0 if it has none.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ */
+export declare function tree_index(node: Node): number;
+/**
+ * Retargets an object against another object.
+ *
+ * @param a - an object to retarget
+ * @param b - an object to retarget against
+ */
+export declare function tree_retarget(a: any, b: any): any;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js
new file mode 100644
index 0000000..0dd4b39
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js
@@ -0,0 +1,853 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("../util");
+var interfaces_1 = require("../dom/interfaces");
+/**
+ * Gets the next descendant of the given node of the tree rooted at `root`
+ * in depth-first pre-order.
+ *
+ * @param root - root node of the tree
+ * @param node - a node
+ * @param shadow - whether to visit shadow tree nodes
+ */
+function _getNextDescendantNode(root, node, shadow) {
+ if (shadow === void 0) { shadow = false; }
+ // traverse shadow tree
+ if (shadow && util_1.Guard.isElementNode(node) && util_1.Guard.isShadowRoot(node.shadowRoot)) {
+ if (node.shadowRoot._firstChild)
+ return node.shadowRoot._firstChild;
+ }
+ // traverse child nodes
+ if (node._firstChild)
+ return node._firstChild;
+ if (node === root)
+ return null;
+ // traverse siblings
+ if (node._nextSibling)
+ return node._nextSibling;
+ // traverse parent's next sibling
+ var parent = node._parent;
+ while (parent && parent !== root) {
+ if (parent._nextSibling)
+ return parent._nextSibling;
+ parent = parent._parent;
+ }
+ return null;
+}
+function _emptyIterator() {
+ var _a;
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ return {
+ next: function () {
+ return { done: true, value: null };
+ }
+ };
+ },
+ _a;
+}
+/**
+ * Returns the first descendant node of the tree rooted at `node` in
+ * depth-first pre-order.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param shadow - whether to visit shadow tree nodes
+ * @param filter - a function to filter nodes
+ */
+function tree_getFirstDescendantNode(node, self, shadow, filter) {
+ if (self === void 0) { self = false; }
+ if (shadow === void 0) { shadow = false; }
+ var firstNode = (self ? node : _getNextDescendantNode(node, node, shadow));
+ while (firstNode && filter && !filter(firstNode)) {
+ firstNode = _getNextDescendantNode(node, firstNode, shadow);
+ }
+ return firstNode;
+}
+exports.tree_getFirstDescendantNode = tree_getFirstDescendantNode;
+/**
+ * Returns the next descendant node of the tree rooted at `node` in
+ * depth-first pre-order.
+ *
+ * @param node - root node of the tree
+ * @param currentNode - current descendant node
+ * @param self - whether to include `node` in traversal
+ * @param shadow - whether to visit shadow tree nodes
+ * @param filter - a function to filter nodes
+ */
+function tree_getNextDescendantNode(node, currentNode, self, shadow, filter) {
+ if (self === void 0) { self = false; }
+ if (shadow === void 0) { shadow = false; }
+ var nextNode = _getNextDescendantNode(node, currentNode, shadow);
+ while (nextNode && filter && !filter(nextNode)) {
+ nextNode = _getNextDescendantNode(node, nextNode, shadow);
+ }
+ return nextNode;
+}
+exports.tree_getNextDescendantNode = tree_getNextDescendantNode;
+/**
+ * Traverses through all descendant nodes of the tree rooted at
+ * `node` in depth-first pre-order.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param shadow - whether to visit shadow tree nodes
+ * @param filter - a function to filter nodes
+ */
+function tree_getDescendantNodes(node, self, shadow, filter) {
+ var _a;
+ if (self === void 0) { self = false; }
+ if (shadow === void 0) { shadow = false; }
+ if (!self && node._children.size === 0) {
+ return _emptyIterator();
+ }
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var currentNode = (self ? node : _getNextDescendantNode(node, node, shadow));
+ return {
+ next: function () {
+ while (currentNode && filter && !filter(currentNode)) {
+ currentNode = _getNextDescendantNode(node, currentNode, shadow);
+ }
+ if (currentNode === null) {
+ return { done: true, value: null };
+ }
+ else {
+ var result = { done: false, value: currentNode };
+ currentNode = _getNextDescendantNode(node, currentNode, shadow);
+ return result;
+ }
+ }
+ };
+ },
+ _a;
+}
+exports.tree_getDescendantNodes = tree_getDescendantNodes;
+/**
+ * Traverses through all descendant element nodes of the tree rooted at
+ * `node` in depth-first preorder.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param shadow - whether to visit shadow tree nodes
+ * @param filter - a function to filter nodes
+ */
+function tree_getDescendantElements(node, self, shadow, filter) {
+ var _a;
+ if (self === void 0) { self = false; }
+ if (shadow === void 0) { shadow = false; }
+ if (!self && node._children.size === 0) {
+ return _emptyIterator();
+ }
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var it = tree_getDescendantNodes(node, self, shadow, function (e) { return util_1.Guard.isElementNode(e); })[Symbol.iterator]();
+ var currentNode = it.next().value;
+ return {
+ next: function () {
+ while (currentNode && filter && !filter(currentNode)) {
+ currentNode = it.next().value;
+ }
+ if (currentNode === null) {
+ return { done: true, value: null };
+ }
+ else {
+ var result = { done: false, value: currentNode };
+ currentNode = it.next().value;
+ return result;
+ }
+ }
+ };
+ },
+ _a;
+}
+exports.tree_getDescendantElements = tree_getDescendantElements;
+/**
+ * Traverses through all sibling nodes of `node`.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param filter - a function to filter nodes
+ */
+function tree_getSiblingNodes(node, self, filter) {
+ var _a;
+ if (self === void 0) { self = false; }
+ if (!node._parent || node._parent._children.size === 0) {
+ return _emptyIterator();
+ }
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var currentNode = node._parent ? node._parent._firstChild : null;
+ return {
+ next: function () {
+ while (currentNode && (filter && !filter(currentNode) || (!self && currentNode === node))) {
+ currentNode = currentNode._nextSibling;
+ }
+ if (currentNode === null) {
+ return { done: true, value: null };
+ }
+ else {
+ var result = { done: false, value: currentNode };
+ currentNode = currentNode._nextSibling;
+ return result;
+ }
+ }
+ };
+ },
+ _a;
+}
+exports.tree_getSiblingNodes = tree_getSiblingNodes;
+/**
+ * Gets the first ancestor of `node` in reverse tree order.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param filter - a function to filter nodes
+ */
+function tree_getFirstAncestorNode(node, self, filter) {
+ if (self === void 0) { self = false; }
+ var firstNode = self ? node : node._parent;
+ while (firstNode && filter && !filter(firstNode)) {
+ firstNode = firstNode._parent;
+ }
+ return firstNode;
+}
+exports.tree_getFirstAncestorNode = tree_getFirstAncestorNode;
+/**
+ * Gets the first ancestor of `node` in reverse tree order.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param filter - a function to filter nodes
+ */
+function tree_getNextAncestorNode(node, currentNode, self, filter) {
+ if (self === void 0) { self = false; }
+ var nextNode = currentNode._parent;
+ while (nextNode && filter && !filter(nextNode)) {
+ nextNode = nextNode._parent;
+ }
+ return nextNode;
+}
+exports.tree_getNextAncestorNode = tree_getNextAncestorNode;
+/**
+ * Traverses through all ancestor nodes `node` in reverse tree order.
+ *
+ * @param node - root node of the tree
+ * @param self - whether to include `node` in traversal
+ * @param filter - a function to filter nodes
+ */
+function tree_getAncestorNodes(node, self, filter) {
+ var _a;
+ if (self === void 0) { self = false; }
+ if (!self && !node._parent) {
+ return _emptyIterator();
+ }
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var currentNode = tree_getFirstAncestorNode(node, self, filter);
+ return {
+ next: function () {
+ if (currentNode === null) {
+ return { done: true, value: null };
+ }
+ else {
+ var result = { done: false, value: currentNode };
+ currentNode = tree_getNextAncestorNode(node, currentNode, self, filter);
+ return result;
+ }
+ }
+ };
+ },
+ _a;
+}
+exports.tree_getAncestorNodes = tree_getAncestorNodes;
+/**
+ * Returns the common ancestor of the given nodes.
+ *
+ * @param nodeA - a node
+ * @param nodeB - a node
+ */
+function tree_getCommonAncestor(nodeA, nodeB) {
+ if (nodeA === nodeB) {
+ return nodeA._parent;
+ }
+ // lists of parent nodes
+ var parentsA = [];
+ var parentsB = [];
+ var pA = tree_getFirstAncestorNode(nodeA, true);
+ while (pA !== null) {
+ parentsA.push(pA);
+ pA = tree_getNextAncestorNode(nodeA, pA, true);
+ }
+ var pB = tree_getFirstAncestorNode(nodeB, true);
+ while (pB !== null) {
+ parentsB.push(pB);
+ pB = tree_getNextAncestorNode(nodeB, pB, true);
+ }
+ // walk through parents backwards until they differ
+ var pos1 = parentsA.length;
+ var pos2 = parentsB.length;
+ var parent = null;
+ for (var i = Math.min(pos1, pos2); i > 0; i--) {
+ var parent1 = parentsA[--pos1];
+ var parent2 = parentsB[--pos2];
+ if (parent1 !== parent2) {
+ break;
+ }
+ parent = parent1;
+ }
+ return parent;
+}
+exports.tree_getCommonAncestor = tree_getCommonAncestor;
+/**
+ * Returns the node following `node` in depth-first preorder.
+ *
+ * @param root - root of the subtree
+ * @param node - a node
+ */
+function tree_getFollowingNode(root, node) {
+ if (node._firstChild) {
+ return node._firstChild;
+ }
+ else if (node._nextSibling) {
+ return node._nextSibling;
+ }
+ else {
+ while (true) {
+ var parent = node._parent;
+ if (parent === null || parent === root) {
+ return null;
+ }
+ else if (parent._nextSibling) {
+ return parent._nextSibling;
+ }
+ else {
+ node = parent;
+ }
+ }
+ }
+}
+exports.tree_getFollowingNode = tree_getFollowingNode;
+/**
+ * Returns the node preceding `node` in depth-first preorder.
+ *
+ * @param root - root of the subtree
+ * @param node - a node
+ */
+function tree_getPrecedingNode(root, node) {
+ if (node === root) {
+ return null;
+ }
+ if (node._previousSibling) {
+ node = node._previousSibling;
+ if (node._lastChild) {
+ return node._lastChild;
+ }
+ else {
+ return node;
+ }
+ }
+ else {
+ return node._parent;
+ }
+}
+exports.tree_getPrecedingNode = tree_getPrecedingNode;
+/**
+ * Determines if the node tree is constrained. A node tree is
+ * constrained as follows, expressed as a relationship between the
+ * type of node and its allowed children:
+ * - Document (In tree order)
+ * * Zero or more nodes each of which is ProcessingInstruction
+ * or Comment.
+ * * Optionally one DocumentType node.
+ * * Zero or more nodes each of which is ProcessingInstruction
+ * or Comment.
+ * * Optionally one Element node.
+ * * Zero or more nodes each of which is ProcessingInstruction
+ * or Comment.
+ * - DocumentFragment, Element
+ * * Zero or more nodes each of which is Element, Text,
+ * ProcessingInstruction, or Comment.
+ * - DocumentType, Text, ProcessingInstruction, Comment
+ * * None.
+ *
+ * @param node - the root of the tree
+ */
+function tree_isConstrained(node) {
+ var e_1, _a, e_2, _b, e_3, _c;
+ switch (node._nodeType) {
+ case interfaces_1.NodeType.Document:
+ var hasDocType = false;
+ var hasElement = false;
+ try {
+ for (var _d = __values(node._children), _e = _d.next(); !_e.done; _e = _d.next()) {
+ var childNode = _e.value;
+ switch (childNode._nodeType) {
+ case interfaces_1.NodeType.ProcessingInstruction:
+ case interfaces_1.NodeType.Comment:
+ break;
+ case interfaces_1.NodeType.DocumentType:
+ if (hasDocType || hasElement)
+ return false;
+ hasDocType = true;
+ break;
+ case interfaces_1.NodeType.Element:
+ if (hasElement)
+ return false;
+ hasElement = true;
+ break;
+ default:
+ return false;
+ }
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ break;
+ case interfaces_1.NodeType.DocumentFragment:
+ case interfaces_1.NodeType.Element:
+ try {
+ for (var _f = __values(node._children), _g = _f.next(); !_g.done; _g = _f.next()) {
+ var childNode = _g.value;
+ switch (childNode._nodeType) {
+ case interfaces_1.NodeType.Element:
+ case interfaces_1.NodeType.Text:
+ case interfaces_1.NodeType.ProcessingInstruction:
+ case interfaces_1.NodeType.CData:
+ case interfaces_1.NodeType.Comment:
+ break;
+ default:
+ return false;
+ }
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ break;
+ case interfaces_1.NodeType.DocumentType:
+ case interfaces_1.NodeType.Text:
+ case interfaces_1.NodeType.ProcessingInstruction:
+ case interfaces_1.NodeType.CData:
+ case interfaces_1.NodeType.Comment:
+ return (!node.hasChildNodes());
+ }
+ try {
+ for (var _h = __values(node._children), _j = _h.next(); !_j.done; _j = _h.next()) {
+ var childNode = _j.value;
+ // recursively check child nodes
+ if (!tree_isConstrained(childNode))
+ return false;
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ return true;
+}
+exports.tree_isConstrained = tree_isConstrained;
+/**
+ * Returns the length of a node.
+ *
+ * @param node - a node to check
+ */
+function tree_nodeLength(node) {
+ /**
+ * To determine the length of a node node, switch on node:
+ * - DocumentType
+ * Zero.
+ * - Text
+ * - ProcessingInstruction
+ * - Comment
+ * Its data’s length.
+ * - Any other node
+ * Its number of children.
+ */
+ if (util_1.Guard.isDocumentTypeNode(node)) {
+ return 0;
+ }
+ else if (util_1.Guard.isCharacterDataNode(node)) {
+ return node._data.length;
+ }
+ else {
+ return node._children.size;
+ }
+}
+exports.tree_nodeLength = tree_nodeLength;
+/**
+ * Determines if a node is empty.
+ *
+ * @param node - a node to check
+ */
+function tree_isEmpty(node) {
+ /**
+ * A node is considered empty if its length is zero.
+ */
+ return (tree_nodeLength(node) === 0);
+}
+exports.tree_isEmpty = tree_isEmpty;
+/**
+ * Returns the root node of a tree. The root of an object is itself,
+ * if its parent is `null`, or else it is the root of its parent.
+ * The root of a tree is any object participating in that tree
+ * whose parent is `null`.
+ *
+ * @param node - a node of the tree
+ * @param shadow - `true` to return shadow-including root, otherwise
+ * `false`
+ */
+function tree_rootNode(node, shadow) {
+ if (shadow === void 0) { shadow = false; }
+ /**
+ * The root of an object is itself, if its parent is null, or else it is the
+ * root of its parent. The root of a tree is any object participating in
+ * that tree whose parent is null.
+ */
+ if (shadow) {
+ var root = tree_rootNode(node, false);
+ if (util_1.Guard.isShadowRoot(root))
+ return tree_rootNode(root._host, true);
+ else
+ return root;
+ }
+ else {
+ if (!node._parent)
+ return node;
+ else
+ return tree_rootNode(node._parent);
+ }
+}
+exports.tree_rootNode = tree_rootNode;
+/**
+ * Determines whether `other` is a descendant of `node`. An object
+ * A is called a descendant of an object B, if either A is a child
+ * of B or A is a child of an object C that is a descendant of B.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ * @param self - if `true`, traversal includes `node` itself
+ * @param shadow - if `true`, traversal includes the
+ * node's and its descendant's shadow trees as well.
+ */
+function tree_isDescendantOf(node, other, self, shadow) {
+ if (self === void 0) { self = false; }
+ if (shadow === void 0) { shadow = false; }
+ /**
+ * An object A is called a descendant of an object B, if either A is a
+ * child of B or A is a child of an object C that is a descendant of B.
+ *
+ * An inclusive descendant is an object or one of its descendants.
+ */
+ var child = tree_getFirstDescendantNode(node, self, shadow);
+ while (child !== null) {
+ if (child === other) {
+ return true;
+ }
+ child = tree_getNextDescendantNode(node, child, self, shadow);
+ }
+ return false;
+}
+exports.tree_isDescendantOf = tree_isDescendantOf;
+/**
+ * Determines whether `other` is an ancestor of `node`. An object A
+ * is called an ancestor of an object B if and only if B is a
+ * descendant of A.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ * @param self - if `true`, traversal includes `node` itself
+ * @param shadow - if `true`, traversal includes the
+ * node's and its descendant's shadow trees as well.
+ */
+function tree_isAncestorOf(node, other, self, shadow) {
+ if (self === void 0) { self = false; }
+ if (shadow === void 0) { shadow = false; }
+ var ancestor = self ? node : shadow && util_1.Guard.isShadowRoot(node) ?
+ node._host : node._parent;
+ while (ancestor !== null) {
+ if (ancestor === other)
+ return true;
+ ancestor = shadow && util_1.Guard.isShadowRoot(ancestor) ?
+ ancestor._host : ancestor._parent;
+ }
+ return false;
+}
+exports.tree_isAncestorOf = tree_isAncestorOf;
+/**
+ * Determines whether `other` is a host-including ancestor of `node`. An
+ * object A is a host-including inclusive ancestor of an object B, if either
+ * A is an inclusive ancestor of B, or if B’s root has a non-null host and
+ * A is a host-including inclusive ancestor of B’s root’s host.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ * @param self - if `true`, traversal includes `node` itself
+ */
+function tree_isHostIncludingAncestorOf(node, other, self) {
+ if (self === void 0) { self = false; }
+ if (tree_isAncestorOf(node, other, self))
+ return true;
+ var root = tree_rootNode(node);
+ if (util_1.Guard.isDocumentFragmentNode(root) && root._host !== null &&
+ tree_isHostIncludingAncestorOf(root._host, other, self))
+ return true;
+ return false;
+}
+exports.tree_isHostIncludingAncestorOf = tree_isHostIncludingAncestorOf;
+/**
+ * Determines whether `other` is a sibling of `node`. An object A is
+ * called a sibling of an object B, if and only if B and A share
+ * the same non-null parent.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ * @param self - if `true`, traversal includes `node` itself
+ */
+function tree_isSiblingOf(node, other, self) {
+ if (self === void 0) { self = false; }
+ /**
+ * An object A is called a sibling of an object B, if and only if B and A
+ * share the same non-null parent.
+ *
+ * An inclusive sibling is an object or one of its siblings.
+ */
+ if (node === other) {
+ if (self)
+ return true;
+ }
+ else {
+ return (node._parent !== null && node._parent === other._parent);
+ }
+ return false;
+}
+exports.tree_isSiblingOf = tree_isSiblingOf;
+/**
+ * Determines whether `other` is preceding `node`. An object A is
+ * preceding an object B if A and B are in the same tree and A comes
+ * before B in tree order.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ */
+function tree_isPreceding(node, other) {
+ /**
+ * An object A is preceding an object B if A and B are in the same tree and
+ * A comes before B in tree order.
+ */
+ var nodePos = tree_treePosition(node);
+ var otherPos = tree_treePosition(other);
+ if (nodePos === -1 || otherPos === -1)
+ return false;
+ else if (tree_rootNode(node) !== tree_rootNode(other))
+ return false;
+ else
+ return otherPos < nodePos;
+}
+exports.tree_isPreceding = tree_isPreceding;
+/**
+ * Determines whether `other` is following `node`. An object A is
+ * following an object B if A and B are in the same tree and A comes
+ * after B in tree order.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ */
+function tree_isFollowing(node, other) {
+ /**
+ * An object A is following an object B if A and B are in the same tree and
+ * A comes after B in tree order.
+ */
+ var nodePos = tree_treePosition(node);
+ var otherPos = tree_treePosition(other);
+ if (nodePos === -1 || otherPos === -1)
+ return false;
+ else if (tree_rootNode(node) !== tree_rootNode(other))
+ return false;
+ else
+ return otherPos > nodePos;
+}
+exports.tree_isFollowing = tree_isFollowing;
+/**
+ * Determines whether `other` is the parent node of `node`.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ */
+function tree_isParentOf(node, other) {
+ /**
+ * An object that participates in a tree has a parent, which is either
+ * null or an object, and has children, which is an ordered set of objects.
+ * An object A whose parent is object B is a child of B.
+ */
+ return (node._parent === other);
+}
+exports.tree_isParentOf = tree_isParentOf;
+/**
+ * Determines whether `other` is a child node of `node`.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ */
+function tree_isChildOf(node, other) {
+ /**
+ * An object that participates in a tree has a parent, which is either
+ * null or an object, and has children, which is an ordered set of objects.
+ * An object A whose parent is object B is a child of B.
+ */
+ return (other._parent === node);
+}
+exports.tree_isChildOf = tree_isChildOf;
+/**
+ * Returns the previous sibling node of `node` or null if it has no
+ * preceding sibling.
+ *
+ * @param node
+ */
+function tree_previousSibling(node) {
+ /**
+ * The previous sibling of an object is its first preceding sibling or null
+ * if it has no preceding sibling.
+ */
+ return node._previousSibling;
+}
+exports.tree_previousSibling = tree_previousSibling;
+/**
+ * Returns the next sibling node of `node` or null if it has no
+ * following sibling.
+ *
+ * @param node
+ */
+function tree_nextSibling(node) {
+ /**
+ * The next sibling of an object is its first following sibling or null
+ * if it has no following sibling.
+ */
+ return node._nextSibling;
+}
+exports.tree_nextSibling = tree_nextSibling;
+/**
+ * Returns the first child node of `node` or null if it has no
+ * children.
+ *
+ * @param node
+ */
+function tree_firstChild(node) {
+ /**
+ * The first child of an object is its first child or null if it has no
+ * children.
+ */
+ return node._firstChild;
+}
+exports.tree_firstChild = tree_firstChild;
+/**
+ * Returns the last child node of `node` or null if it has no
+ * children.
+ *
+ * @param node
+ */
+function tree_lastChild(node) {
+ /**
+ * The last child of an object is its last child or null if it has no
+ * children.
+ */
+ return node._lastChild;
+}
+exports.tree_lastChild = tree_lastChild;
+/**
+ * Returns the zero-based index of `node` when counted preorder in
+ * the tree rooted at `root`. Returns `-1` if `node` is not in
+ * the tree.
+ *
+ * @param node - the node to get the index of
+ */
+function tree_treePosition(node) {
+ var root = tree_rootNode(node);
+ var pos = 0;
+ var childNode = tree_getFirstDescendantNode(root);
+ while (childNode !== null) {
+ pos++;
+ if (childNode === node)
+ return pos;
+ childNode = tree_getNextDescendantNode(root, childNode);
+ }
+ return -1;
+}
+exports.tree_treePosition = tree_treePosition;
+/**
+ * Determines the index of `node`. The index of an object is its number of
+ * preceding siblings, or 0 if it has none.
+ *
+ * @param node - a node
+ * @param other - the node to check
+ */
+function tree_index(node) {
+ /**
+ * The index of an object is its number of preceding siblings, or 0 if it
+ * has none.
+ */
+ var n = 0;
+ while (node._previousSibling !== null) {
+ n++;
+ node = node._previousSibling;
+ }
+ return n;
+}
+exports.tree_index = tree_index;
+/**
+ * Retargets an object against another object.
+ *
+ * @param a - an object to retarget
+ * @param b - an object to retarget against
+ */
+function tree_retarget(a, b) {
+ /**
+ * To retarget an object A against an object B, repeat these steps until
+ * they return an object:
+ * 1. If one of the following is true
+ * - A is not a node
+ * - A's root is not a shadow root
+ * - B is a node and A's root is a shadow-including inclusive ancestor
+ * of B
+ * then return A.
+ * 2. Set A to A's root's host.
+ */
+ while (true) {
+ if (!a || !util_1.Guard.isNode(a)) {
+ return a;
+ }
+ var rootOfA = tree_rootNode(a);
+ if (!util_1.Guard.isShadowRoot(rootOfA)) {
+ return a;
+ }
+ if (b && util_1.Guard.isNode(b) && tree_isAncestorOf(rootOfA, b, true, true)) {
+ return a;
+ }
+ a = rootOfA.host;
+ }
+}
+exports.tree_retarget = tree_retarget;
+//# sourceMappingURL=TreeAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js.map
new file mode 100644
index 0000000..1696a50
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"TreeAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/TreeAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,gCAA+B;AAC/B,gDAA2D;AAE3D;;;;;;;GAOG;AACH,SAAS,sBAAs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,CAAC,CAAA;QAChC,IAAI,CAAC,YAAK,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE;YAChC,OAAO,CAAC,CAAA;SACT;QAED,IAAI,CAAC,IAAI,YAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,iBAAiB,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE;YACrE,OAAO,CAAC,CAAA;SACT;QAED,CAAC,GAAG,OAAO,CAAC,IAAI,CAAA;KACjB;AACH,CAAC;AA7BD,sCA6BC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.d.ts
new file mode 100644
index 0000000..212e5a9
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.d.ts
@@ -0,0 +1,17 @@
+import { TreeWalker, Node } from "../dom/interfaces";
+/**
+ * Returns the first or last child node, or `null` if there are none.
+ *
+ * @param walker - the `TreeWalker` instance
+ * @param first - `true` to return the first child node, or `false` to
+ * return the last child node.
+ */
+export declare function treeWalker_traverseChildren(walker: TreeWalker, first: boolean): Node | null;
+/**
+ * Returns the next or previous sibling node, or `null` if there are none.
+ *
+ * @param walker - the `TreeWalker` instance
+ * @param next - `true` to return the next sibling node, or `false` to
+ * return the previous sibling node.
+ */
+export declare function treeWalker_traverseSiblings(walker: TreeWalker, next: boolean): Node | null;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js
new file mode 100644
index 0000000..ec275d6
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js
@@ -0,0 +1,147 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("../dom/interfaces");
+var TraversalAlgorithm_1 = require("./TraversalAlgorithm");
+/**
+ * Returns the first or last child node, or `null` if there are none.
+ *
+ * @param walker - the `TreeWalker` instance
+ * @param first - `true` to return the first child node, or `false` to
+ * return the last child node.
+ */
+function treeWalker_traverseChildren(walker, first) {
+ /**
+ * 1. Let node be walker’s current.
+ * 2. Set node to node’s first child if type is first, and node’s last child
+ * if type is last.
+ * 3. While node is non-null:
+ */
+ var node = (first ? walker._current._firstChild : walker._current._lastChild);
+ while (node !== null) {
+ /**
+ * 3.1. Let result be the result of filtering node within walker.
+ */
+ var result = TraversalAlgorithm_1.traversal_filter(walker, node);
+ if (result === interfaces_1.FilterResult.Accept) {
+ /**
+ * 3.2. If result is FILTER_ACCEPT, then set walker’s current to node and
+ * return node.
+ */
+ walker._current = node;
+ return node;
+ }
+ else if (result === interfaces_1.FilterResult.Skip) {
+ /**
+ * 3.3. If result is FILTER_SKIP, then:
+ * 3.3.1. Let child be node’s first child if type is first, and node’s
+ * last child if type is last.
+ * 3.3.2. If child is non-null, then set node to child and continue.
+ */
+ var child = (first ? node._firstChild : node._lastChild);
+ if (child !== null) {
+ node = child;
+ continue;
+ }
+ }
+ /**
+ * 3.4. While node is non-null:
+ */
+ while (node !== null) {
+ /**
+ * 3.4.1. Let sibling be node’s next sibling if type is first, and
+ * node’s previous sibling if type is last.
+ * 3.4.2. If sibling is non-null, then set node to sibling and break.
+ */
+ var sibling = (first ? node._nextSibling : node._previousSibling);
+ if (sibling !== null) {
+ node = sibling;
+ break;
+ }
+ /**
+ * 3.4.3. Let parent be node’s parent.
+ * 3.4.4. If parent is null, walker’s root, or walker’s current, then
+ * return null.
+ */
+ var parent = node._parent;
+ if (parent === null || parent === walker._root || parent === walker._current) {
+ return null;
+ }
+ /**
+ * 3.4.5. Set node to parent.
+ */
+ node = parent;
+ }
+ }
+ /**
+ * 5. Return null
+ */
+ return null;
+}
+exports.treeWalker_traverseChildren = treeWalker_traverseChildren;
+/**
+ * Returns the next or previous sibling node, or `null` if there are none.
+ *
+ * @param walker - the `TreeWalker` instance
+ * @param next - `true` to return the next sibling node, or `false` to
+ * return the previous sibling node.
+ */
+function treeWalker_traverseSiblings(walker, next) {
+ /**
+ * 1. Let node be walker’s current.
+ * 2. If node is root, then return null.
+ * 3. While node is non-null:
+ */
+ var node = walker._current;
+ if (node === walker._root)
+ return null;
+ while (true) {
+ /**
+ * 3.1. Let sibling be node’s next sibling if type is next, and node’s
+ * previous sibling if type is previous.
+ * 3.2. While sibling is non-null:
+ */
+ var sibling = (next ? node._nextSibling : node._previousSibling);
+ while (sibling !== null) {
+ /**
+ * 3.2.1. Set node to sibling.
+ * 3.2.2. Let result be the result of filtering node within walker.
+ * 3.2.3. If result is FILTER_ACCEPT, then set walker’s current to node
+ * and return node.
+ */
+ node = sibling;
+ var result = TraversalAlgorithm_1.traversal_filter(walker, node);
+ if (result === interfaces_1.FilterResult.Accept) {
+ walker._current = node;
+ return node;
+ }
+ /**
+ * 3.2.4. Set sibling to node’s first child if type is next, and node’s
+ * last child if type is previous.
+ * 3.2.5. If result is FILTER_REJECT or sibling is null, then set
+ * sibling to node’s next sibling if type is next, and node’s previous
+ * sibling if type is previous.
+ */
+ sibling = (next ? node._firstChild : node._lastChild);
+ if (result === interfaces_1.FilterResult.Reject || sibling === null) {
+ sibling = (next ? node._nextSibling : node._previousSibling);
+ }
+ }
+ /**
+ * 3.3. Set node to node’s parent.
+ * 3.4. If node is null or walker’s root, then return null.
+ */
+ node = node._parent;
+ if (node === null || node === walker._root) {
+ return null;
+ }
+ /**
+ * 3.5. If the return value of filtering node within walker is FILTER_ACCEPT,
+ * then return null.
+ */
+ if (TraversalAlgorithm_1.traversal_filter(walker, node) === interfaces_1.FilterResult.Accept) {
+ return null;
+ }
+ }
+}
+exports.treeWalker_traverseSiblings = treeWalker_traverseSiblings;
+//# sourceMappingURL=TreeWalkerAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js.map
new file mode 100644
index 0000000..bb5223d
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"TreeWalkerAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/TreeWalkerAlgorithm.ts"],"names":[],"mappings":";;AAAA,gDAAkE;AAClE,2DAAuD;AAEvD;;;;;;GAMG;AACH,SAAgB,2BAA2B,CAAC,MAAkB,EAAE,KAAc;IAC5E;;;;;OAKG;IACH,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;IAC7E,OAAO,IAAI,KAAK,IAAI,EAAE;QACpB;;WAEG;QACH,IAAM,MAAM,GAAG,qCAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QAE7C,IAAI,MAAM,KAAK,yBAAY,CAAC,MAAM,EAAE;YAClC;;;eAGG;YACH,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAA;YACtB,OAAO,IAAI,CAAA;SACZ;aAAM,IAAI,MAAM,KAAK,yBAAY,CAAC,IAAI,EAAE;YACvC;;;;;eAKG;YACH,IAAM,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;YAC1D,IAAI,KAAK,KAAK,IAAI,EAAE;gBAClB,IAAI,GAAG,KAAK,CAAA;gBACZ,SAAQ;aACT;SACF;QAED;;WAEG;QACH,OAAO,IAAI,KAAK,IAAI,EAAE;YACpB;;;;eAIG;YACH,IAAM,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;YACnE,IAAI,OAAO,KAAK,IAAI,EAAE;gBACpB,I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AC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;aAC7D;SACF;QAED;;;WAGG;QACH,IAAI,GAAG,IAAI,CAAC,OAAO,CAAA;QACnB,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,MAAM,CAAC,KAAK,EAAE;YAC1C,OAAO,IAAI,CAAA;SACZ;QAED;;;WAGG;QACH,IAAI,qCAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,yBAAY,CAAC,MAAM,EAAE;YAC1D,OAAO,IAAI,CAAA;SACZ;KACF;AACH,CAAC;AA7DD,kEA6DC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.d.ts
new file mode 100644
index 0000000..b7177ee
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.d.ts
@@ -0,0 +1,8 @@
+/**
+ * Defines a WebIDL `Const` property on the given object.
+ *
+ * @param o - object on which to add the property
+ * @param name - property name
+ * @param value - property value
+ */
+export declare function idl_defineConst(o: any, name: string, value: string | number | boolean): void;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js
new file mode 100644
index 0000000..13f4add
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js
@@ -0,0 +1,14 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Defines a WebIDL `Const` property on the given object.
+ *
+ * @param o - object on which to add the property
+ * @param name - property name
+ * @param value - property value
+ */
+function idl_defineConst(o, name, value) {
+ Object.defineProperty(o, name, { writable: false, enumerable: true, configurable: false, value: value });
+}
+exports.idl_defineConst = idl_defineConst;
+//# sourceMappingURL=WebIDLAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js.map
new file mode 100644
index 0000000..7d46d9f
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"WebIDLAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/WebIDLAlgorithm.ts"],"names":[],"mappings":";;AAAA;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,CAAM,EAAE,IAAY,EAAE,KAAgC;IACpF,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,IAAI,EAC3B,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAA;AAC7E,CAAC;AAHD,0CAGC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.d.ts
new file mode 100644
index 0000000..7fea4a7
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.d.ts
@@ -0,0 +1,25 @@
+/**
+ * Determines if the given string is valid for a `"Name"` construct.
+ *
+ * @param name - name string to test
+ */
+export declare function xml_isName(name: string): boolean;
+/**
+ * Determines if the given string is valid for a `"QName"` construct.
+ *
+ * @param name - name string to test
+ */
+export declare function xml_isQName(name: string): boolean;
+/**
+ * Determines if the given string contains legal characters.
+ *
+ * @param chars - sequence of characters to test
+ */
+export declare function xml_isLegalChar(chars: string): boolean;
+/**
+ * Determines if the given string contains legal characters for a public
+ * identifier.
+ *
+ * @param chars - sequence of characters to test
+ */
+export declare function xml_isPubidChar(chars: string): boolean;
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js b/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js
new file mode 100644
index 0000000..c9405c3
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js
@@ -0,0 +1,164 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Determines if the given string is valid for a `"Name"` construct.
+ *
+ * @param name - name string to test
+ */
+function xml_isName(name) {
+ for (var i = 0; i < name.length; i++) {
+ var n = name.charCodeAt(i);
+ // NameStartChar
+ if ((n >= 97 && n <= 122) || // [a-z]
+ (n >= 65 && n <= 90) || // [A-Z]
+ n === 58 || n === 95 || // ':' or '_'
+ (n >= 0xC0 && n <= 0xD6) ||
+ (n >= 0xD8 && n <= 0xF6) ||
+ (n >= 0xF8 && n <= 0x2FF) ||
+ (n >= 0x370 && n <= 0x37D) ||
+ (n >= 0x37F && n <= 0x1FFF) ||
+ (n >= 0x200C && n <= 0x200D) ||
+ (n >= 0x2070 && n <= 0x218F) ||
+ (n >= 0x2C00 && n <= 0x2FEF) ||
+ (n >= 0x3001 && n <= 0xD7FF) ||
+ (n >= 0xF900 && n <= 0xFDCF) ||
+ (n >= 0xFDF0 && n <= 0xFFFD)) {
+ continue;
+ }
+ else if (i !== 0 &&
+ (n === 45 || n === 46 || // '-' or '.'
+ (n >= 48 && n <= 57) || // [0-9]
+ (n === 0xB7) ||
+ (n >= 0x0300 && n <= 0x036F) ||
+ (n >= 0x203F && n <= 0x2040))) {
+ continue;
+ }
+ if (n >= 0xD800 && n <= 0xDBFF && i < name.length - 1) {
+ var n2 = name.charCodeAt(i + 1);
+ if (n2 >= 0xDC00 && n2 <= 0xDFFF) {
+ n = (n - 0xD800) * 0x400 + n2 - 0xDC00 + 0x10000;
+ i++;
+ if (n >= 0x10000 && n <= 0xEFFFF) {
+ continue;
+ }
+ }
+ }
+ return false;
+ }
+ return true;
+}
+exports.xml_isName = xml_isName;
+/**
+ * Determines if the given string is valid for a `"QName"` construct.
+ *
+ * @param name - name string to test
+ */
+function xml_isQName(name) {
+ var colonFound = false;
+ for (var i = 0; i < name.length; i++) {
+ var n = name.charCodeAt(i);
+ // NameStartChar
+ if ((n >= 97 && n <= 122) || // [a-z]
+ (n >= 65 && n <= 90) || // [A-Z]
+ n === 95 || // '_'
+ (n >= 0xC0 && n <= 0xD6) ||
+ (n >= 0xD8 && n <= 0xF6) ||
+ (n >= 0xF8 && n <= 0x2FF) ||
+ (n >= 0x370 && n <= 0x37D) ||
+ (n >= 0x37F && n <= 0x1FFF) ||
+ (n >= 0x200C && n <= 0x200D) ||
+ (n >= 0x2070 && n <= 0x218F) ||
+ (n >= 0x2C00 && n <= 0x2FEF) ||
+ (n >= 0x3001 && n <= 0xD7FF) ||
+ (n >= 0xF900 && n <= 0xFDCF) ||
+ (n >= 0xFDF0 && n <= 0xFFFD)) {
+ continue;
+ }
+ else if (i !== 0 &&
+ (n === 45 || n === 46 || // '-' or '.'
+ (n >= 48 && n <= 57) || // [0-9]
+ (n === 0xB7) ||
+ (n >= 0x0300 && n <= 0x036F) ||
+ (n >= 0x203F && n <= 0x2040))) {
+ continue;
+ }
+ else if (i !== 0 && n === 58) { // :
+ if (colonFound)
+ return false; // multiple colons in qname
+ if (i === name.length - 1)
+ return false; // colon at the end of qname
+ colonFound = true;
+ continue;
+ }
+ if (n >= 0xD800 && n <= 0xDBFF && i < name.length - 1) {
+ var n2 = name.charCodeAt(i + 1);
+ if (n2 >= 0xDC00 && n2 <= 0xDFFF) {
+ n = (n - 0xD800) * 0x400 + n2 - 0xDC00 + 0x10000;
+ i++;
+ if (n >= 0x10000 && n <= 0xEFFFF) {
+ continue;
+ }
+ }
+ }
+ return false;
+ }
+ return true;
+}
+exports.xml_isQName = xml_isQName;
+/**
+ * Determines if the given string contains legal characters.
+ *
+ * @param chars - sequence of characters to test
+ */
+function xml_isLegalChar(chars) {
+ for (var i = 0; i < chars.length; i++) {
+ var n = chars.charCodeAt(i);
+ // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+ if (n === 0x9 || n === 0xA || n === 0xD ||
+ (n >= 0x20 && n <= 0xD7FF) ||
+ (n >= 0xE000 && n <= 0xFFFD)) {
+ continue;
+ }
+ if (n >= 0xD800 && n <= 0xDBFF && i < chars.length - 1) {
+ var n2 = chars.charCodeAt(i + 1);
+ if (n2 >= 0xDC00 && n2 <= 0xDFFF) {
+ n = (n - 0xD800) * 0x400 + n2 - 0xDC00 + 0x10000;
+ i++;
+ if (n >= 0x10000 && n <= 0x10FFFF) {
+ continue;
+ }
+ }
+ }
+ return false;
+ }
+ return true;
+}
+exports.xml_isLegalChar = xml_isLegalChar;
+/**
+ * Determines if the given string contains legal characters for a public
+ * identifier.
+ *
+ * @param chars - sequence of characters to test
+ */
+function xml_isPubidChar(chars) {
+ for (var i = 0; i < chars.length; i++) {
+ // PubId chars are all in the ASCII range, no need to check surrogates
+ var n = chars.charCodeAt(i);
+ // #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
+ if ((n >= 97 && n <= 122) || // [a-z]
+ (n >= 65 && n <= 90) || // [A-Z]
+ (n >= 39 && n <= 59) || // ['()*+,-./] | [0-9] | [:;]
+ n === 0x20 || n === 0xD || n === 0xA || // #x20 | #xD | #xA
+ (n >= 35 && n <= 37) || // [#$%]
+ n === 33 || // !
+ n === 61 || n === 63 || n === 64 || n === 95) { // [=?@_]
+ continue;
+ }
+ else {
+ return false;
+ }
+ }
+ return true;
+}
+exports.xml_isPubidChar = xml_isPubidChar;
+//# sourceMappingURL=XMLAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js.map b/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js.map
new file mode 100644
index 0000000..046927e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"XMLAlgorithm.js","sourceRoot":"","sources":["../../src/algorithm/XMLAlgorithm.ts"],"names":[],"mappings":";;AAA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AAK,CAAA;SACb;KACF;IAED,OAAO,IAAI,CAAA;AACb,CAAC;AApBD,0CAoBC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/index.d.ts b/node_modules/@oozcitak/dom/lib/algorithm/index.d.ts
new file mode 100644
index 0000000..b966faa
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/index.d.ts
@@ -0,0 +1,28 @@
+export * from "./AbortAlgorithm";
+export * from "./AttrAlgorithm";
+export * from "./BoundaryPointAlgorithm";
+export * from "./CharacterDataAlgorithm";
+export * from "./CreateAlgorithm";
+export * from "./CustomElementAlgorithm";
+export * from "./DocumentAlgorithm";
+export * from "./DOMAlgorithm";
+export * from "./DOMTokenListAlgorithm";
+export * from "./ElementAlgorithm";
+export * from "./EventAlgorithm";
+export * from "./EventTargetAlgorithm";
+export * from "./MutationAlgorithm";
+export * from "./MutationObserverAlgorithm";
+export * from "./NamespaceAlgorithm";
+export * from "./NodeAlgorithm";
+export * from "./NodeIteratorAlgorithm";
+export * from "./OrderedSetAlgorithm";
+export * from "./ParentNodeAlgorithm";
+export * from "./RangeAlgorithm";
+export * from "./SelectorsAlgorithm";
+export * from "./ShadowTreeAlgorithm";
+export * from "./TextAlgorithm";
+export * from "./TraversalAlgorithm";
+export * from "./TreeAlgorithm";
+export * from "./TreeWalkerAlgorithm";
+export * from "./WebIDLAlgorithm";
+export * from "./XMLAlgorithm";
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/index.js b/node_modules/@oozcitak/dom/lib/algorithm/index.js
new file mode 100644
index 0000000..6256d62
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/index.js
@@ -0,0 +1,34 @@
+"use strict";
+function __export(m) {
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", { value: true });
+__export(require("./AbortAlgorithm"));
+__export(require("./AttrAlgorithm"));
+__export(require("./BoundaryPointAlgorithm"));
+__export(require("./CharacterDataAlgorithm"));
+__export(require("./CreateAlgorithm"));
+__export(require("./CustomElementAlgorithm"));
+__export(require("./DocumentAlgorithm"));
+__export(require("./DOMAlgorithm"));
+__export(require("./DOMTokenListAlgorithm"));
+__export(require("./ElementAlgorithm"));
+__export(require("./EventAlgorithm"));
+__export(require("./EventTargetAlgorithm"));
+__export(require("./MutationAlgorithm"));
+__export(require("./MutationObserverAlgorithm"));
+__export(require("./NamespaceAlgorithm"));
+__export(require("./NodeAlgorithm"));
+__export(require("./NodeIteratorAlgorithm"));
+__export(require("./OrderedSetAlgorithm"));
+__export(require("./ParentNodeAlgorithm"));
+__export(require("./RangeAlgorithm"));
+__export(require("./SelectorsAlgorithm"));
+__export(require("./ShadowTreeAlgorithm"));
+__export(require("./TextAlgorithm"));
+__export(require("./TraversalAlgorithm"));
+__export(require("./TreeAlgorithm"));
+__export(require("./TreeWalkerAlgorithm"));
+__export(require("./WebIDLAlgorithm"));
+__export(require("./XMLAlgorithm"));
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/algorithm/index.js.map b/node_modules/@oozcitak/dom/lib/algorithm/index.js.map
new file mode 100644
index 0000000..b1ad4fb
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/algorithm/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/algorithm/index.ts"],"names":[],"mappings":";;;;;AAAA,sCAAgC;AAChC,qCAA+B;AAC/B,8CAAwC;AACxC,8CAAwC;AACxC,uCAAiC;AACjC,8CAAwC;AACxC,yCAAmC;AACnC,oCAA8B;AAC9B,6CAAuC;AACvC,wCAAkC;AAClC,sCAAgC;AAChC,4CAAsC;AACtC,yCAAmC;AACnC,iDAA2C;AAC3C,0CAAoC;AACpC,qCAA+B;AAC/B,6CAAuC;AACvC,2CAAqC;AACrC,2CAAqC;AACrC,sCAAgC;AAChC,0CAAoC;AACpC,2CAAqC;AACrC,qCAA+B;AAC/B,0CAAoC;AACpC,qCAA+B;AAC/B,2CAAqC;AACrC,uCAAiC;AACjC,oCAA8B"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.d.ts
new file mode 100644
index 0000000..2a80deb
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.d.ts
@@ -0,0 +1,15 @@
+import { AbortSignal, AbortController } from "./interfaces";
+/**
+ * Represents a controller that allows to abort DOM requests.
+ */
+export declare class AbortControllerImpl implements AbortController {
+ _signal: AbortSignal;
+ /**
+ * Initializes a new instance of `AbortController`.
+ */
+ constructor();
+ /** @inheritdoc */
+ get signal(): AbortSignal;
+ /** @inheritdoc */
+ abort(): void;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js b/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js
new file mode 100644
index 0000000..7fab9b0
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js
@@ -0,0 +1,32 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents a controller that allows to abort DOM requests.
+ */
+var AbortControllerImpl = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `AbortController`.
+ */
+ function AbortControllerImpl() {
+ /**
+ * 1. Let signal be a new AbortSignal object.
+ * 2. Let controller be a new AbortController object whose signal is signal.
+ * 3. Return controller.
+ */
+ this._signal = algorithm_1.create_abortSignal();
+ }
+ Object.defineProperty(AbortControllerImpl.prototype, "signal", {
+ /** @inheritdoc */
+ get: function () { return this._signal; },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ AbortControllerImpl.prototype.abort = function () {
+ algorithm_1.abort_signalAbort(this._signal);
+ };
+ return AbortControllerImpl;
+}());
+exports.AbortControllerImpl = AbortControllerImpl;
+//# sourceMappingURL=AbortControllerImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js.map
new file mode 100644
index 0000000..d0f8cac
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"AbortControllerImpl.js","sourceRoot":"","sources":["../../src/dom/AbortControllerImpl.ts"],"names":[],"mappings":";;AACA,0CAAoE;AAEpE;;GAEG;AACH;IAIE;;OAEG;IACH;QACE;;;;WAIG;QACH,IAAI,CAAC,OAAO,GAAG,8BAAkB,EAAE,CAAA;IACrC,CAAC;IAGD,sBAAI,uCAAM;QADV,kBAAkB;aAClB,cAA4B,OAAO,IAAI,CAAC,OAAO,CAAA,CAAC,CAAC;;;OAAA;IAEjD,kBAAkB;IAClB,mCAAK,GAAL;QACE,6BAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACjC,CAAC;IAEH,0BAAC;AAAD,CAAC,AAxBD,IAwBC;AAxBY,kDAAmB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.d.ts
new file mode 100644
index 0000000..c2581b1
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.d.ts
@@ -0,0 +1,23 @@
+import { EventHandler, AbortSignal } from "./interfaces";
+import { EventTargetImpl } from "./EventTargetImpl";
+/**
+ * Represents a signal object that communicates with a DOM request and abort
+ * it through an AbortController.
+ */
+export declare class AbortSignalImpl extends EventTargetImpl implements AbortSignal {
+ _abortedFlag: boolean;
+ _abortAlgorithms: Set<(...args: any[]) => any>;
+ /**
+ * Initializes a new instance of `AbortSignal`.
+ */
+ private constructor();
+ /** @inheritdoc */
+ get aborted(): boolean;
+ /** @inheritdoc */
+ get onabort(): EventHandler;
+ set onabort(val: EventHandler);
+ /**
+ * Creates a new `AbortSignal`.
+ */
+ static _create(): AbortSignalImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js b/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js
new file mode 100644
index 0000000..23d93c8
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js
@@ -0,0 +1,59 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var EventTargetImpl_1 = require("./EventTargetImpl");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents a signal object that communicates with a DOM request and abort
+ * it through an AbortController.
+ */
+var AbortSignalImpl = /** @class */ (function (_super) {
+ __extends(AbortSignalImpl, _super);
+ /**
+ * Initializes a new instance of `AbortSignal`.
+ */
+ function AbortSignalImpl() {
+ var _this = _super.call(this) || this;
+ _this._abortedFlag = false;
+ _this._abortAlgorithms = new Set();
+ return _this;
+ }
+ Object.defineProperty(AbortSignalImpl.prototype, "aborted", {
+ /** @inheritdoc */
+ get: function () { return this._abortedFlag; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AbortSignalImpl.prototype, "onabort", {
+ /** @inheritdoc */
+ get: function () {
+ return algorithm_1.event_getterEventHandlerIDLAttribute(this, "onabort");
+ },
+ set: function (val) {
+ algorithm_1.event_setterEventHandlerIDLAttribute(this, "onabort", val);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Creates a new `AbortSignal`.
+ */
+ AbortSignalImpl._create = function () {
+ return new AbortSignalImpl();
+ };
+ return AbortSignalImpl;
+}(EventTargetImpl_1.EventTargetImpl));
+exports.AbortSignalImpl = AbortSignalImpl;
+//# sourceMappingURL=AbortSignalImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js.map
new file mode 100644
index 0000000..722850d
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"AbortSignalImpl.js","sourceRoot":"","sources":["../../src/dom/AbortSignalImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,qDAAmD;AACnD,0CAEqB;AAErB;;;GAGG;AACH;IAAqC,mCAAe;IAKlD;;OAEG;IACH;QAAA,YACE,iBAAO,SACR;QARD,kBAAY,GAAY,KAAK,CAAA;QAC7B,sBAAgB,GAAiC,IAAI,GAAG,EAAE,CAAA;;IAO1D,CAAC;IAGD,sBAAI,oCAAO;QADX,kBAAkB;aAClB,cAAyB,OAAO,IAAI,CAAC,YAAY,CAAA,CAAC,CAAC;;;OAAA;IAGnD,sBAAI,oCAAO;QADX,kBAAkB;aAClB;YACE,OAAO,gDAAoC,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC9D,CAAC;aACD,UAAY,GAAiB;YAC3B,gDAAoC,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAA;QAC5D,CAAC;;;OAHA;IAKD;;OAEG;IACI,uBAAO,GAAd;QACE,OAAO,IAAI,eAAe,EAAE,CAAA;IAC9B,CAAC;IAEH,sBAAC;AAAD,CAAC,AA9BD,CAAqC,iCAAe,GA8BnD;AA9BY,0CAAe"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.d.ts
new file mode 100644
index 0000000..5a6d3c5
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.d.ts
@@ -0,0 +1,23 @@
+import { Node, BoundaryPoint, AbstractRange } from "./interfaces";
+/**
+ * Represents an abstract range with a start and end boundary point.
+ */
+export declare abstract class AbstractRangeImpl implements AbstractRange {
+ abstract _start: BoundaryPoint;
+ abstract _end: BoundaryPoint;
+ get _startNode(): Node;
+ get _startOffset(): number;
+ get _endNode(): Node;
+ get _endOffset(): number;
+ get _collapsed(): boolean;
+ /** @inheritdoc */
+ get startContainer(): Node;
+ /** @inheritdoc */
+ get startOffset(): number;
+ /** @inheritdoc */
+ get endContainer(): Node;
+ /** @inheritdoc */
+ get endOffset(): number;
+ /** @inheritdoc */
+ get collapsed(): boolean;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js b/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js
new file mode 100644
index 0000000..a168613
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js
@@ -0,0 +1,70 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Represents an abstract range with a start and end boundary point.
+ */
+var AbstractRangeImpl = /** @class */ (function () {
+ function AbstractRangeImpl() {
+ }
+ Object.defineProperty(AbstractRangeImpl.prototype, "_startNode", {
+ get: function () { return this._start[0]; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AbstractRangeImpl.prototype, "_startOffset", {
+ get: function () { return this._start[1]; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AbstractRangeImpl.prototype, "_endNode", {
+ get: function () { return this._end[0]; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AbstractRangeImpl.prototype, "_endOffset", {
+ get: function () { return this._end[1]; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AbstractRangeImpl.prototype, "_collapsed", {
+ get: function () {
+ return (this._start[0] === this._end[0] &&
+ this._start[1] === this._end[1]);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AbstractRangeImpl.prototype, "startContainer", {
+ /** @inheritdoc */
+ get: function () { return this._startNode; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AbstractRangeImpl.prototype, "startOffset", {
+ /** @inheritdoc */
+ get: function () { return this._startOffset; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AbstractRangeImpl.prototype, "endContainer", {
+ /** @inheritdoc */
+ get: function () { return this._endNode; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AbstractRangeImpl.prototype, "endOffset", {
+ /** @inheritdoc */
+ get: function () { return this._endOffset; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AbstractRangeImpl.prototype, "collapsed", {
+ /** @inheritdoc */
+ get: function () { return this._collapsed; },
+ enumerable: true,
+ configurable: true
+ });
+ return AbstractRangeImpl;
+}());
+exports.AbstractRangeImpl = AbstractRangeImpl;
+//# sourceMappingURL=AbstractRangeImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js.map
new file mode 100644
index 0000000..6b27cd9
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"AbstractRangeImpl.js","sourceRoot":"","sources":["../../src/dom/AbstractRangeImpl.ts"],"names":[],"mappings":";;AAEA;;GAEG;AACH;IAAA;IA8BA,CAAC;IAzBC,sBAAI,yCAAU;aAAd,cAAyB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA,CAAC,CAAC;;;OAAA;IAChD,sBAAI,2CAAY;aAAhB,cAA6B,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA,CAAC,CAAC;;;OAAA;IACpD,sBAAI,uCAAQ;aAAZ,cAAuB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA,CAAC,CAAC;;;OAAA;IAC5C,sBAAI,yCAAU;aAAd,cAA2B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA,CAAC,CAAC;;;OAAA;IAEhD,sBAAI,yCAAU;aAAd;YACE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBACrC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;QACpC,CAAC;;;OAAA;IAGD,sBAAI,6CAAc;QADlB,kBAAkB;aAClB,cAA6B,OAAO,IAAI,CAAC,UAAU,CAAA,CAAC,CAAC;;;OAAA;IAGrD,sBAAI,0CAAW;QADf,kBAAkB;aAClB,cAA4B,OAAO,IAAI,CAAC,YAAY,CAAA,CAAC,CAAC;;;OAAA;IAGtD,sBAAI,2CAAY;QADhB,kBAAkB;aAClB,cAA2B,OAAO,IAAI,CAAC,QAAQ,CAAA,CAAC,CAAC;;;OAAA;IAGjD,sBAAI,wCAAS;QADb,kBAAkB;aAClB,cAA0B,OAAO,IAAI,CAAC,UAAU,CAAA,CAAC,CAAC;;;OAAA;IAGlD,sBAAI,wCAAS;QADb,kBAAkB;aAClB,cAA2B,OAAO,IAAI,CAAC,UAAU,CAAA,CAAC,CAAC;;;OAAA;IAErD,wBAAC;AAAD,CAAC,AA9BD,IA8BC;AA9BqB,8CAAiB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/AttrImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/AttrImpl.d.ts
new file mode 100644
index 0000000..9ef8981
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/AttrImpl.d.ts
@@ -0,0 +1,45 @@
+import { Element, NodeType, Attr, Document } from "./interfaces";
+import { NodeImpl } from "./NodeImpl";
+/**
+ * Represents an attribute of an element node.
+ */
+export declare class AttrImpl extends NodeImpl implements Attr {
+ _nodeType: NodeType;
+ _localName: string;
+ _namespace: string | null;
+ _namespacePrefix: string | null;
+ _element: Element | null;
+ _value: string;
+ /**
+ * Initializes a new instance of `Attr`.
+ *
+ * @param localName - local name
+ */
+ private constructor();
+ /** @inheritdoc */
+ specified: boolean;
+ /** @inheritdoc */
+ get ownerElement(): Element | null;
+ /** @inheritdoc */
+ get namespaceURI(): string | null;
+ /** @inheritdoc */
+ get prefix(): string | null;
+ /** @inheritdoc */
+ get localName(): string;
+ /** @inheritdoc */
+ get name(): string;
+ /** @inheritdoc */
+ get value(): string;
+ set value(value: string);
+ /**
+ * Returns the qualified name.
+ */
+ get _qualifiedName(): string;
+ /**
+ * Creates an `Attr`.
+ *
+ * @param document - owner document
+ * @param localName - local name
+ */
+ static _create(document: Document, localName: string): AttrImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js b/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js
new file mode 100644
index 0000000..7fde932
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js
@@ -0,0 +1,118 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("./interfaces");
+var NodeImpl_1 = require("./NodeImpl");
+var algorithm_1 = require("../algorithm");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+/**
+ * Represents an attribute of an element node.
+ */
+var AttrImpl = /** @class */ (function (_super) {
+ __extends(AttrImpl, _super);
+ /**
+ * Initializes a new instance of `Attr`.
+ *
+ * @param localName - local name
+ */
+ function AttrImpl(localName) {
+ var _this = _super.call(this) || this;
+ _this._namespace = null;
+ _this._namespacePrefix = null;
+ _this._element = null;
+ _this._value = '';
+ _this._localName = localName;
+ return _this;
+ }
+ Object.defineProperty(AttrImpl.prototype, "ownerElement", {
+ /** @inheritdoc */
+ get: function () { return this._element; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AttrImpl.prototype, "namespaceURI", {
+ /** @inheritdoc */
+ get: function () { return this._namespace; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AttrImpl.prototype, "prefix", {
+ /** @inheritdoc */
+ get: function () { return this._namespacePrefix; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AttrImpl.prototype, "localName", {
+ /** @inheritdoc */
+ get: function () { return this._localName; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AttrImpl.prototype, "name", {
+ /** @inheritdoc */
+ get: function () { return this._qualifiedName; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AttrImpl.prototype, "value", {
+ /** @inheritdoc */
+ get: function () { return this._value; },
+ set: function (value) {
+ /**
+ * The value attribute’s setter must set an existing attribute value with
+ * context object and the given value.
+ */
+ algorithm_1.attr_setAnExistingAttributeValue(this, value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(AttrImpl.prototype, "_qualifiedName", {
+ /**
+ * Returns the qualified name.
+ */
+ get: function () {
+ /**
+ * An attribute’s qualified name is its local name if its namespace prefix
+ * is null, and its namespace prefix, followed by ":", followed by its
+ * local name, otherwise.
+ */
+ return (this._namespacePrefix !== null ?
+ this._namespacePrefix + ':' + this._localName :
+ this._localName);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Creates an `Attr`.
+ *
+ * @param document - owner document
+ * @param localName - local name
+ */
+ AttrImpl._create = function (document, localName) {
+ var node = new AttrImpl(localName);
+ node._nodeDocument = document;
+ return node;
+ };
+ return AttrImpl;
+}(NodeImpl_1.NodeImpl));
+exports.AttrImpl = AttrImpl;
+/**
+ * Initialize prototype properties
+ */
+WebIDLAlgorithm_1.idl_defineConst(AttrImpl.prototype, "_nodeType", interfaces_1.NodeType.Attribute);
+WebIDLAlgorithm_1.idl_defineConst(AttrImpl.prototype, "specified", true);
+//# sourceMappingURL=AttrImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js.map
new file mode 100644
index 0000000..16b5361
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"AttrImpl.js","sourceRoot":"","sources":["../../src/dom/AttrImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAgE;AAChE,uCAAqC;AACrC,0CAA+D;AAC/D,gEAA8D;AAE9D;;GAEG;AACH;IAA8B,4BAAQ;IASpC;;;;OAIG;IACH,kBAAoB,SAAiB;QAArC,YACE,iBAAO,SAGR;QAdD,gBAAU,GAAkB,IAAI,CAAA;QAChC,sBAAgB,GAAkB,IAAI,CAAA;QACtC,cAAQ,GAAmB,IAAI,CAAA;QAC/B,YAAM,GAAW,EAAE,CAAA;QAUjB,KAAI,CAAC,UAAU,GAAG,SAAS,CAAA;;IAC7B,CAAC;IAMD,sBAAI,kCAAY;QADhB,kBAAkB;aAClB,cAAqC,OAAO,IAAI,CAAC,QAAQ,CAAA,CAAC,CAAC;;;OAAA;IAG3D,sBAAI,kCAAY;QADhB,kBAAkB;aAClB,cAAoC,OAAO,IAAI,CAAC,UAAU,CAAA,CAAC,CAAC;;;OAAA;IAG5D,sBAAI,4BAAM;QADV,kBAAkB;aAClB,cAA8B,OAAO,IAAI,CAAC,gBAAgB,CAAA,CAAC,CAAC;;;OAAA;IAG5D,sBAAI,+BAAS;QADb,kBAAkB;aAClB,cAA0B,OAAO,IAAI,CAAC,UAAU,CAAA,CAAC,CAAC;;;OAAA;IAGlD,sBAAI,0BAAI;QADR,kBAAkB;aAClB,cAAqB,OAAO,IAAI,CAAC,cAAc,CAAA,CAAC,CAAC;;;OAAA;IAGjD,sBAAI,2BAAK;QADT,kBAAkB;aAClB,cAAsB,OAAO,IAAI,CAAC,MAAM,CAAA,CAAC,CAAC;aAC1C,UAAU,KAAa;YACrB;;;eAGG;YACH,4CAAgC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QAC/C,CAAC;;;OAPyC;IAY1C,sBAAI,oCAAc;QAHlB;;WAEG;aACH;YACE;;;;eAIG;YACH,OAAO,CAAC,IAAI,CAAC,gBAAgB,KAAK,IAAI,CAAC,CAAC;gBACtC,IAAI,CAAC,gBAAgB,GAAG,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC/C,IAAI,CAAC,UAAU,CAAC,CAAA;QACpB,CAAC;;;OAAA;IAED;;;;;OAKG;IACI,gBAAO,GAAd,UAAe,QAAkB,EAAE,SAAiB;QAClD,IAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,SAAS,CAAC,CAAA;QACpC,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAA;QAC7B,OAAO,IAAI,CAAA;IACb,CAAC;IAEH,eAAC;AAAD,CAAC,AA1ED,CAA8B,mBAAQ,GA0ErC;AA1EY,4BAAQ;AA4ErB;;GAEG;AACH,iCAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,WAAW,EAAE,qBAAQ,CAAC,SAAS,CAAC,CAAA;AACpE,iCAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.d.ts
new file mode 100644
index 0000000..e2ff3bf
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.d.ts
@@ -0,0 +1,21 @@
+import { TextImpl } from "./TextImpl";
+import { NodeType, CDATASection, Document } from "./interfaces";
+/**
+ * Represents a CDATA node.
+ */
+export declare class CDATASectionImpl extends TextImpl implements CDATASection {
+ _nodeType: NodeType;
+ /**
+ * Initializes a new instance of `CDATASection`.
+ *
+ * @param data - node contents
+ */
+ private constructor();
+ /**
+ * Creates a new `CDATASection`.
+ *
+ * @param document - owner document
+ * @param data - node contents
+ */
+ static _create(document: Document, data?: string): CDATASectionImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js b/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js
new file mode 100644
index 0000000..65aade3
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js
@@ -0,0 +1,51 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var TextImpl_1 = require("./TextImpl");
+var interfaces_1 = require("./interfaces");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+/**
+ * Represents a CDATA node.
+ */
+var CDATASectionImpl = /** @class */ (function (_super) {
+ __extends(CDATASectionImpl, _super);
+ /**
+ * Initializes a new instance of `CDATASection`.
+ *
+ * @param data - node contents
+ */
+ function CDATASectionImpl(data) {
+ return _super.call(this, data) || this;
+ }
+ /**
+ * Creates a new `CDATASection`.
+ *
+ * @param document - owner document
+ * @param data - node contents
+ */
+ CDATASectionImpl._create = function (document, data) {
+ if (data === void 0) { data = ''; }
+ var node = new CDATASectionImpl(data);
+ node._nodeDocument = document;
+ return node;
+ };
+ return CDATASectionImpl;
+}(TextImpl_1.TextImpl));
+exports.CDATASectionImpl = CDATASectionImpl;
+/**
+ * Initialize prototype properties
+ */
+WebIDLAlgorithm_1.idl_defineConst(CDATASectionImpl.prototype, "_nodeType", interfaces_1.NodeType.CData);
+//# sourceMappingURL=CDATASectionImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js.map
new file mode 100644
index 0000000..0533e57
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"CDATASectionImpl.js","sourceRoot":"","sources":["../../src/dom/CDATASectionImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uCAAqC;AACrC,2CAA+D;AAC/D,gEAA8D;AAE9D;;GAEG;AACH;IAAsC,oCAAQ;IAI5C;;;;OAIG;IACH,0BAAoB,IAAY;eAC9B,kBAAM,IAAI,CAAC;IACb,CAAC;IAED;;;;;OAKG;IACI,wBAAO,GAAd,UAAe,QAAkB,EAAE,IAAiB;QAAjB,qBAAA,EAAA,SAAiB;QAClD,IAAM,IAAI,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAA;QACvC,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAA;QAC7B,OAAO,IAAI,CAAA;IACb,CAAC;IAEH,uBAAC;AAAD,CAAC,AAzBD,CAAsC,mBAAQ,GAyB7C;AAzBY,4CAAgB;AA2B7B;;GAEG;AACH,iCAAe,CAAC,gBAAgB,CAAC,SAAS,EAAE,WAAW,EAAE,qBAAQ,CAAC,KAAK,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.d.ts
new file mode 100644
index 0000000..bcff169
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.d.ts
@@ -0,0 +1,35 @@
+import { Element, Node, CharacterData } from "./interfaces";
+import { NodeImpl } from "./NodeImpl";
+/**
+ * Represents a generic text node.
+ */
+export declare abstract class CharacterDataImpl extends NodeImpl implements CharacterData {
+ _data: string;
+ /**
+ * Initializes a new instance of `CharacterData`.
+ *
+ * @param data - the text content
+ */
+ protected constructor(data: string);
+ /** @inheritdoc */
+ get data(): string;
+ set data(value: string);
+ /** @inheritdoc */
+ get length(): number;
+ /** @inheritdoc */
+ substringData(offset: number, count: number): string;
+ /** @inheritdoc */
+ appendData(data: string): void;
+ /** @inheritdoc */
+ insertData(offset: number, data: string): void;
+ /** @inheritdoc */
+ deleteData(offset: number, count: number): void;
+ /** @inheritdoc */
+ replaceData(offset: number, count: number, data: string): void;
+ get previousElementSibling(): Element | null;
+ get nextElementSibling(): Element | null;
+ before(...nodes: (Node | string)[]): void;
+ after(...nodes: (Node | string)[]): void;
+ replaceWith(...nodes: (Node | string)[]): void;
+ remove(): void;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js b/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js
new file mode 100644
index 0000000..bb6f653
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js
@@ -0,0 +1,132 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var NodeImpl_1 = require("./NodeImpl");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents a generic text node.
+ */
+var CharacterDataImpl = /** @class */ (function (_super) {
+ __extends(CharacterDataImpl, _super);
+ /**
+ * Initializes a new instance of `CharacterData`.
+ *
+ * @param data - the text content
+ */
+ function CharacterDataImpl(data) {
+ var _this = _super.call(this) || this;
+ _this._data = data;
+ return _this;
+ }
+ Object.defineProperty(CharacterDataImpl.prototype, "data", {
+ /** @inheritdoc */
+ get: function () { return this._data; },
+ set: function (value) {
+ algorithm_1.characterData_replaceData(this, 0, this._data.length, value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(CharacterDataImpl.prototype, "length", {
+ /** @inheritdoc */
+ get: function () { return this._data.length; },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ CharacterDataImpl.prototype.substringData = function (offset, count) {
+ /**
+ * The substringData(offset, count) method, when invoked, must return the
+ * result of running substring data with node context object, offset offset, and count count.
+ */
+ return algorithm_1.characterData_substringData(this, offset, count);
+ };
+ /** @inheritdoc */
+ CharacterDataImpl.prototype.appendData = function (data) {
+ /**
+ * The appendData(data) method, when invoked, must replace data with node
+ * context object, offset context object’s length, count 0, and data data.
+ */
+ return algorithm_1.characterData_replaceData(this, this._data.length, 0, data);
+ };
+ /** @inheritdoc */
+ CharacterDataImpl.prototype.insertData = function (offset, data) {
+ /**
+ * The insertData(offset, data) method, when invoked, must replace data with
+ * node context object, offset offset, count 0, and data data.
+ */
+ algorithm_1.characterData_replaceData(this, offset, 0, data);
+ };
+ /** @inheritdoc */
+ CharacterDataImpl.prototype.deleteData = function (offset, count) {
+ /**
+ * The deleteData(offset, count) method, when invoked, must replace data
+ * with node context object, offset offset, count count, and data the
+ * empty string.
+ */
+ algorithm_1.characterData_replaceData(this, offset, count, '');
+ };
+ /** @inheritdoc */
+ CharacterDataImpl.prototype.replaceData = function (offset, count, data) {
+ /**
+ * The replaceData(offset, count, data) method, when invoked, must replace
+ * data with node context object, offset offset, count count, and data data.
+ */
+ algorithm_1.characterData_replaceData(this, offset, count, data);
+ };
+ Object.defineProperty(CharacterDataImpl.prototype, "previousElementSibling", {
+ // MIXIN: NonDocumentTypeChildNode
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: NonDocumentTypeChildNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(CharacterDataImpl.prototype, "nextElementSibling", {
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: NonDocumentTypeChildNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ // MIXIN: ChildNode
+ /* istanbul ignore next */
+ CharacterDataImpl.prototype.before = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ChildNode not implemented.");
+ };
+ /* istanbul ignore next */
+ CharacterDataImpl.prototype.after = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ChildNode not implemented.");
+ };
+ /* istanbul ignore next */
+ CharacterDataImpl.prototype.replaceWith = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ChildNode not implemented.");
+ };
+ /* istanbul ignore next */
+ CharacterDataImpl.prototype.remove = function () { throw new Error("Mixin: ChildNode not implemented."); };
+ return CharacterDataImpl;
+}(NodeImpl_1.NodeImpl));
+exports.CharacterDataImpl = CharacterDataImpl;
+//# sourceMappingURL=CharacterDataImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js.map
new file mode 100644
index 0000000..62eca42
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"CharacterDataImpl.js","sourceRoot":"","sources":["../../src/dom/CharacterDataImpl.ts"],"names":[],"mappings":";;;;;;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AY;QACrD;;;WAGG;QACH,qCAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAA;IACtD,CAAC;IAKD,sBAAI,qDAAsB;QAF1B,kCAAkC;QAClC,0BAA0B;aAC1B,cAA+C,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA,CAAC,CAAC;;;OAAA;IAEpH,sBAAI,iDAAkB;QADtB,0BAA0B;aAC1B,cAA2C,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA,CAAC,CAAC;;;OAAA;IAEhH,mBAAmB;IACnB,0BAA0B;IAC1B,kCAAM,GAAN;QAAO,eAA2B;aAA3B,UAA2B,EAA3B,qBAA2B,EAA3B,IAA2B;YAA3B,0BAA2B;;QAAU,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;IAAC,CAAC;IAClG,0BAA0B;IAC1B,iCAAK,GAAL;QAAM,eAA2B;aAA3B,UAA2B,EAA3B,qBAA2B,EAA3B,IAA2B;YAA3B,0BAA2B;;QAAU,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;IAAC,CAAC;IACjG,0BAA0B;IAC1B,uCAAW,GAAX;QAAY,eAA2B;aAA3B,UAA2B,EAA3B,qBAA2B,EAA3B,IAA2B;YAA3B,0BAA2B;;QAAU,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;IAAC,CAAC;IACvG,0BAA0B;IAC1B,kCAAM,GAAN,cAAiB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA,CAAC,CAAC;IAEzE,wBAAC;AAAD,CAAC,AAvFD,CAAgD,mBAAQ,GAuFvD;AAvFqB,8CAAiB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.d.ts
new file mode 100644
index 0000000..7d30cd1
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.d.ts
@@ -0,0 +1,16 @@
+import { Node, ChildNode } from "./interfaces";
+/**
+ * Represents a mixin that extends child nodes that can have siblings
+ * including doctypes. This mixin is implemented by {@link Element},
+ * {@link CharacterData} and {@link DocumentType}.
+ */
+export declare class ChildNodeImpl implements ChildNode {
+ /** @inheritdoc */
+ before(...nodes: (Node | string)[]): void;
+ /** @inheritdoc */
+ after(...nodes: (Node | string)[]): void;
+ /** @inheritdoc */
+ replaceWith(...nodes: (Node | string)[]): void;
+ /** @inheritdoc */
+ remove(): void;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js b/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js
new file mode 100644
index 0000000..0020c15
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js
@@ -0,0 +1,165 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("../util");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents a mixin that extends child nodes that can have siblings
+ * including doctypes. This mixin is implemented by {@link Element},
+ * {@link CharacterData} and {@link DocumentType}.
+ */
+var ChildNodeImpl = /** @class */ (function () {
+ function ChildNodeImpl() {
+ }
+ /** @inheritdoc */
+ ChildNodeImpl.prototype.before = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ /**
+ * 1. Let parent be context object’s parent.
+ * 2. If parent is null, then return.
+ */
+ var context = util_1.Cast.asNode(this);
+ var parent = context._parent;
+ if (parent === null)
+ return;
+ /**
+ * 3. Let viablePreviousSibling be context object’s first preceding
+ * sibling not in nodes, and null otherwise.
+ */
+ var viablePreviousSibling = context._previousSibling;
+ var flag = true;
+ while (flag && viablePreviousSibling) {
+ flag = false;
+ for (var i = 0; i < nodes.length; i++) {
+ var child = nodes[i];
+ if (child === viablePreviousSibling) {
+ viablePreviousSibling = viablePreviousSibling._previousSibling;
+ flag = true;
+ break;
+ }
+ }
+ }
+ /**
+ * 4. Let node be the result of converting nodes into a node, given nodes
+ * and context object’s node document.
+ */
+ var node = algorithm_1.parentNode_convertNodesIntoANode(nodes, context._nodeDocument);
+ /**
+ * 5. If viablePreviousSibling is null, set it to parent’s first child,
+ * and to viablePreviousSibling’s next sibling otherwise.
+ */
+ if (viablePreviousSibling === null)
+ viablePreviousSibling = parent._firstChild;
+ else
+ viablePreviousSibling = viablePreviousSibling._nextSibling;
+ /**
+ * 6. Pre-insert node into parent before viablePreviousSibling.
+ */
+ algorithm_1.mutation_preInsert(node, parent, viablePreviousSibling);
+ };
+ /** @inheritdoc */
+ ChildNodeImpl.prototype.after = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ /**
+ * 1. Let parent be context object’s parent.
+ * 2. If parent is null, then return.
+ */
+ var context = util_1.Cast.asNode(this);
+ var parent = context._parent;
+ if (!parent)
+ return;
+ /**
+ * 3. Let viableNextSibling be context object’s first following sibling not
+ * in nodes, and null otherwise.
+ */
+ var viableNextSibling = context._nextSibling;
+ var flag = true;
+ while (flag && viableNextSibling) {
+ flag = false;
+ for (var i = 0; i < nodes.length; i++) {
+ var child = nodes[i];
+ if (child === viableNextSibling) {
+ viableNextSibling = viableNextSibling._nextSibling;
+ flag = true;
+ break;
+ }
+ }
+ }
+ /**
+ * 4. Let node be the result of converting nodes into a node, given nodes
+ * and context object’s node document.
+ */
+ var node = algorithm_1.parentNode_convertNodesIntoANode(nodes, context._nodeDocument);
+ /**
+ * 5. Pre-insert node into parent before viableNextSibling.
+ */
+ algorithm_1.mutation_preInsert(node, parent, viableNextSibling);
+ };
+ /** @inheritdoc */
+ ChildNodeImpl.prototype.replaceWith = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ /**
+ * 1. Let parent be context object’s parent.
+ * 2. If parent is null, then return.
+ */
+ var context = util_1.Cast.asNode(this);
+ var parent = context._parent;
+ if (!parent)
+ return;
+ /**
+ * 3. Let viableNextSibling be context object’s first following sibling not
+ * in nodes, and null otherwise.
+ */
+ var viableNextSibling = context._nextSibling;
+ var flag = true;
+ while (flag && viableNextSibling) {
+ flag = false;
+ for (var i = 0; i < nodes.length; i++) {
+ var child = nodes[i];
+ if (child === viableNextSibling) {
+ viableNextSibling = viableNextSibling._nextSibling;
+ flag = true;
+ break;
+ }
+ }
+ }
+ /**
+ * 4. Let node be the result of converting nodes into a node, given nodes
+ * and context object’s node document.
+ */
+ var node = algorithm_1.parentNode_convertNodesIntoANode(nodes, context._nodeDocument);
+ /**
+ * 5. If context object’s parent is parent, replace the context object with
+ * node within parent.
+ * _Note:_ Context object could have been inserted into node.
+ * 6. Otherwise, pre-insert node into parent before viableNextSibling.
+ */
+ if (context._parent === parent)
+ algorithm_1.mutation_replace(context, node, parent);
+ else
+ algorithm_1.mutation_preInsert(node, parent, viableNextSibling);
+ };
+ /** @inheritdoc */
+ ChildNodeImpl.prototype.remove = function () {
+ /**
+ * 1. If context object’s parent is null, then return.
+ * 2. Remove the context object from context object’s parent.
+ */
+ var context = util_1.Cast.asNode(this);
+ var parent = context._parent;
+ if (!parent)
+ return;
+ algorithm_1.mutation_remove(context, parent);
+ };
+ return ChildNodeImpl;
+}());
+exports.ChildNodeImpl = ChildNodeImpl;
+//# sourceMappingURL=ChildNodeImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js.map
new file mode 100644
index 0000000..6136529
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ChildNodeImpl.js","sourceRoot":"","sources":["../../src/dom/ChildNodeImpl.ts"],"names":[],"mappings":";;AACA,gCAA8B;AAC9B,0CAGqB;AAErB;;;;GAIG;AACH;IAAA;IA2JA,CAAC;IAzJC,kBAAk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EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACrC,IAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gBACvB,IAAI,KAAK,KAAK,iBAAiB,EAAE;oBAC/B,iBAAiB,GAAG,iBAAiB,CAAC,YAAY,CAAA;oBAClD,IAAI,GAAG,IAAI,CAAA;oBACX,MAAK;iBACN;aACF;SACF;QAED;;;WAGG;QACH,IAAM,IAAI,GAAG,4CAAgC,CAAC,KAAK,EACjD,OAAO,CAAC,aAAa,CAAC,CAAA;QAExB;;;;;WAKG;QACH,IAAI,OAAO,CAAC,OAAO,KAAK,MAAM;YAC5B,4BAAgB,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;;YAEvC,8BAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAA;IACvD,CAAC;IAED,kBAAkB;IAClB,8BAAM,GAAN;QACE;;;WAGG;QACH,IAAM,OAAO,GAAG,WAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QACjC,IAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAA;QAC9B,IAAI,CAAC,MAAM;YAAE,OAAM;QAEnB,2BAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IAClC,CAAC;IAEH,oBAAC;AAAD,CAAC,AA3JD,IA2JC;AA3JY,sCAAa"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/CommentImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/CommentImpl.d.ts
new file mode 100644
index 0000000..96221a1
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/CommentImpl.d.ts
@@ -0,0 +1,21 @@
+import { NodeType, Comment, Document } from "./interfaces";
+import { CharacterDataImpl } from "./CharacterDataImpl";
+/**
+ * Represents a comment node.
+ */
+export declare class CommentImpl extends CharacterDataImpl implements Comment {
+ _nodeType: NodeType;
+ /**
+ * Initializes a new instance of `Comment`.
+ *
+ * @param data - the text content
+ */
+ constructor(data?: string);
+ /**
+ * Creates a new `Comment`.
+ *
+ * @param document - owner document
+ * @param data - node contents
+ */
+ static _create(document: Document, data?: string): CommentImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js b/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js
new file mode 100644
index 0000000..902d15c
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js
@@ -0,0 +1,52 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("./interfaces");
+var CharacterDataImpl_1 = require("./CharacterDataImpl");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+/**
+ * Represents a comment node.
+ */
+var CommentImpl = /** @class */ (function (_super) {
+ __extends(CommentImpl, _super);
+ /**
+ * Initializes a new instance of `Comment`.
+ *
+ * @param data - the text content
+ */
+ function CommentImpl(data) {
+ if (data === void 0) { data = ''; }
+ return _super.call(this, data) || this;
+ }
+ /**
+ * Creates a new `Comment`.
+ *
+ * @param document - owner document
+ * @param data - node contents
+ */
+ CommentImpl._create = function (document, data) {
+ if (data === void 0) { data = ''; }
+ var node = new CommentImpl(data);
+ node._nodeDocument = document;
+ return node;
+ };
+ return CommentImpl;
+}(CharacterDataImpl_1.CharacterDataImpl));
+exports.CommentImpl = CommentImpl;
+/**
+ * Initialize prototype properties
+ */
+WebIDLAlgorithm_1.idl_defineConst(CommentImpl.prototype, "_nodeType", interfaces_1.NodeType.Comment);
+//# sourceMappingURL=CommentImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js.map
new file mode 100644
index 0000000..bae5f09
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"CommentImpl.js","sourceRoot":"","sources":["../../src/dom/CommentImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA0D;AAC1D,yDAAuD;AACvD,gEAA8D;AAE9D;;GAEG;AACH;IAAiC,+BAAiB;IAIhD;;;;OAIG;IACH,qBAAmB,IAAiB;QAAjB,qBAAA,EAAA,SAAiB;eAClC,kBAAM,IAAI,CAAC;IACb,CAAC;IAGD;;;;;OAKG;IACI,mBAAO,GAAd,UAAe,QAAkB,EAAE,IAAiB;QAAjB,qBAAA,EAAA,SAAiB;QAClD,IAAM,IAAI,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,CAAA;QAClC,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAA;QAC7B,OAAO,IAAI,CAAA;IACb,CAAC;IAEH,kBAAC;AAAD,CAAC,AA1BD,CAAiC,qCAAiB,GA0BjD;AA1BY,kCAAW;AA4BxB;;GAEG;AACH,iCAAe,CAAC,WAAW,CAAC,SAAS,EAAE,WAAW,EAAE,qBAAQ,CAAC,OAAO,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.d.ts
new file mode 100644
index 0000000..509feb0
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.d.ts
@@ -0,0 +1,16 @@
+import { CustomEventInit, CustomEvent } from "./interfaces";
+import { EventImpl } from "./EventImpl";
+/**
+ * Represents and event that carries custom data.
+ */
+export declare class CustomEventImpl extends EventImpl implements CustomEvent {
+ protected _detail: any;
+ /**
+ * Initializes a new instance of `CustomEvent`.
+ */
+ constructor(type: string, eventInit?: CustomEventInit);
+ /** @inheritdoc */
+ get detail(): any;
+ /** @inheritdoc */
+ initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: any): void;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js b/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js
new file mode 100644
index 0000000..299b3e2
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js
@@ -0,0 +1,60 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var EventImpl_1 = require("./EventImpl");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents and event that carries custom data.
+ */
+var CustomEventImpl = /** @class */ (function (_super) {
+ __extends(CustomEventImpl, _super);
+ /**
+ * Initializes a new instance of `CustomEvent`.
+ */
+ function CustomEventImpl(type, eventInit) {
+ var _this = _super.call(this, type, eventInit) || this;
+ _this._detail = null;
+ _this._detail = (eventInit && eventInit.detail) || null;
+ return _this;
+ }
+ Object.defineProperty(CustomEventImpl.prototype, "detail", {
+ /** @inheritdoc */
+ get: function () { return this._detail; },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ CustomEventImpl.prototype.initCustomEvent = function (type, bubbles, cancelable, detail) {
+ if (bubbles === void 0) { bubbles = false; }
+ if (cancelable === void 0) { cancelable = false; }
+ if (detail === void 0) { detail = null; }
+ /**
+ * 1. If the context object’s dispatch flag is set, then return.
+ */
+ if (this._dispatchFlag)
+ return;
+ /**
+ * 2. Initialize the context object with type, bubbles, and cancelable.
+ */
+ algorithm_1.event_initialize(this, type, bubbles, cancelable);
+ /**
+ * 3. Set the context object’s detail attribute to detail.
+ */
+ this._detail = detail;
+ };
+ return CustomEventImpl;
+}(EventImpl_1.EventImpl));
+exports.CustomEventImpl = CustomEventImpl;
+//# sourceMappingURL=CustomEventImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js.map
new file mode 100644
index 0000000..1e4a0c2
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"CustomEventImpl.js","sourceRoot":"","sources":["../../src/dom/CustomEventImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,yCAAuC;AACvC,0CAA+C;AAE/C;;GAEG;AACH;IAAqC,mCAAS;IAI5C;;OAEG;IACH,yBAAmB,IAAY,EAAE,SAA2B;QAA5D,YACE,kBAAM,IAAI,EAAE,SAAS,CAAC,SAGvB;QATS,aAAO,GAAQ,IAAI,CAAA;QAQ3B,KAAI,CAAC,OAAO,GAAG,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,CAAA;;IACxD,CAAC;IAGD,sBAAI,mCAAM;QADV,kBAAkB;aAClB,cAAoB,OAAO,IAAI,CAAC,OAAO,CAAA,CAAC,CAAC;;;OAAA;IAEzC,kBAAkB;IAClB,yCAAe,GAAf,UAAgB,IAAY,EAAE,OAAe,EAAE,UAAkB,EAAE,MAAkB;QAAvD,wBAAA,EAAA,eAAe;QAAE,2BAAA,EAAA,kBAAkB;QAAE,uBAAA,EAAA,aAAkB;QACnF;;WAEG;QACH,IAAI,IAAI,CAAC,aAAa;YAAE,OAAM;QAE9B;;WAEG;QACH,4BAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAA;QAEjD;;WAEG;QACH,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;IACvB,CAAC;IAEH,sBAAC;AAAD,CAAC,AAlCD,CAAqC,qBAAS,GAkC7C;AAlCY,0CAAe"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DOMException.d.ts b/node_modules/@oozcitak/dom/lib/dom/DOMException.d.ts
new file mode 100644
index 0000000..e0c39fb
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DOMException.d.ts
@@ -0,0 +1,171 @@
+/**
+ * Represents the base class of `Error` objects used by this module.
+ */
+export declare class DOMException extends Error {
+ /**
+ * Returns the name of the error message.
+ */
+ readonly name: string;
+ /**
+ *
+ * @param name - message name
+ * @param message - error message
+ */
+ constructor(name: string, message?: string);
+}
+export declare class DOMStringSizeError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class WrongDocumentError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class NoDataAllowedError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class NoModificationAllowedError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class NotSupportedError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class InUseAttributeError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class InvalidStateError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class InvalidModificationError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class NamespaceError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class InvalidAccessError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class ValidationError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class TypeMismatchError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class SecurityError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class NetworkError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class AbortError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class URLMismatchError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class QuotaExceededError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class TimeoutError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class InvalidNodeTypeError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class DataCloneError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class NotImplementedError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class HierarchyRequestError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class NotFoundError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class IndexSizeError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class SyntaxError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
+export declare class InvalidCharacterError extends DOMException {
+ /**
+ * @param message - error message
+ */
+ constructor(message?: string);
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/DOMException.js b/node_modules/@oozcitak/dom/lib/dom/DOMException.js
new file mode 100644
index 0000000..7ff4bd7
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DOMException.js
@@ -0,0 +1,347 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Represents the base class of `Error` objects used by this module.
+ */
+var DOMException = /** @class */ (function (_super) {
+ __extends(DOMException, _super);
+ /**
+ *
+ * @param name - message name
+ * @param message - error message
+ */
+ function DOMException(name, message) {
+ if (message === void 0) { message = ""; }
+ var _this = _super.call(this, message) || this;
+ _this.name = name;
+ return _this;
+ }
+ return DOMException;
+}(Error));
+exports.DOMException = DOMException;
+var DOMStringSizeError = /** @class */ (function (_super) {
+ __extends(DOMStringSizeError, _super);
+ /**
+ * @param message - error message
+ */
+ function DOMStringSizeError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "DOMStringSizeError", message) || this;
+ }
+ return DOMStringSizeError;
+}(DOMException));
+exports.DOMStringSizeError = DOMStringSizeError;
+var WrongDocumentError = /** @class */ (function (_super) {
+ __extends(WrongDocumentError, _super);
+ /**
+ * @param message - error message
+ */
+ function WrongDocumentError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "WrongDocumentError", "The object is in the wrong document. " + message) || this;
+ }
+ return WrongDocumentError;
+}(DOMException));
+exports.WrongDocumentError = WrongDocumentError;
+var NoDataAllowedError = /** @class */ (function (_super) {
+ __extends(NoDataAllowedError, _super);
+ /**
+ * @param message - error message
+ */
+ function NoDataAllowedError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "NoDataAllowedError", message) || this;
+ }
+ return NoDataAllowedError;
+}(DOMException));
+exports.NoDataAllowedError = NoDataAllowedError;
+var NoModificationAllowedError = /** @class */ (function (_super) {
+ __extends(NoModificationAllowedError, _super);
+ /**
+ * @param message - error message
+ */
+ function NoModificationAllowedError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "NoModificationAllowedError", "The object can not be modified. " + message) || this;
+ }
+ return NoModificationAllowedError;
+}(DOMException));
+exports.NoModificationAllowedError = NoModificationAllowedError;
+var NotSupportedError = /** @class */ (function (_super) {
+ __extends(NotSupportedError, _super);
+ /**
+ * @param message - error message
+ */
+ function NotSupportedError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "NotSupportedError", "The operation is not supported. " + message) || this;
+ }
+ return NotSupportedError;
+}(DOMException));
+exports.NotSupportedError = NotSupportedError;
+var InUseAttributeError = /** @class */ (function (_super) {
+ __extends(InUseAttributeError, _super);
+ /**
+ * @param message - error message
+ */
+ function InUseAttributeError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "InUseAttributeError", message) || this;
+ }
+ return InUseAttributeError;
+}(DOMException));
+exports.InUseAttributeError = InUseAttributeError;
+var InvalidStateError = /** @class */ (function (_super) {
+ __extends(InvalidStateError, _super);
+ /**
+ * @param message - error message
+ */
+ function InvalidStateError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "InvalidStateError", "The object is in an invalid state. " + message) || this;
+ }
+ return InvalidStateError;
+}(DOMException));
+exports.InvalidStateError = InvalidStateError;
+var InvalidModificationError = /** @class */ (function (_super) {
+ __extends(InvalidModificationError, _super);
+ /**
+ * @param message - error message
+ */
+ function InvalidModificationError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "InvalidModificationError", "The object can not be modified in this way. " + message) || this;
+ }
+ return InvalidModificationError;
+}(DOMException));
+exports.InvalidModificationError = InvalidModificationError;
+var NamespaceError = /** @class */ (function (_super) {
+ __extends(NamespaceError, _super);
+ /**
+ * @param message - error message
+ */
+ function NamespaceError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "NamespaceError", "The operation is not allowed by Namespaces in XML. [XMLNS] " + message) || this;
+ }
+ return NamespaceError;
+}(DOMException));
+exports.NamespaceError = NamespaceError;
+var InvalidAccessError = /** @class */ (function (_super) {
+ __extends(InvalidAccessError, _super);
+ /**
+ * @param message - error message
+ */
+ function InvalidAccessError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "InvalidAccessError", "The object does not support the operation or argument. " + message) || this;
+ }
+ return InvalidAccessError;
+}(DOMException));
+exports.InvalidAccessError = InvalidAccessError;
+var ValidationError = /** @class */ (function (_super) {
+ __extends(ValidationError, _super);
+ /**
+ * @param message - error message
+ */
+ function ValidationError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "ValidationError", message) || this;
+ }
+ return ValidationError;
+}(DOMException));
+exports.ValidationError = ValidationError;
+var TypeMismatchError = /** @class */ (function (_super) {
+ __extends(TypeMismatchError, _super);
+ /**
+ * @param message - error message
+ */
+ function TypeMismatchError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "TypeMismatchError", message) || this;
+ }
+ return TypeMismatchError;
+}(DOMException));
+exports.TypeMismatchError = TypeMismatchError;
+var SecurityError = /** @class */ (function (_super) {
+ __extends(SecurityError, _super);
+ /**
+ * @param message - error message
+ */
+ function SecurityError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "SecurityError", "The operation is insecure. " + message) || this;
+ }
+ return SecurityError;
+}(DOMException));
+exports.SecurityError = SecurityError;
+var NetworkError = /** @class */ (function (_super) {
+ __extends(NetworkError, _super);
+ /**
+ * @param message - error message
+ */
+ function NetworkError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "NetworkError", "A network error occurred. " + message) || this;
+ }
+ return NetworkError;
+}(DOMException));
+exports.NetworkError = NetworkError;
+var AbortError = /** @class */ (function (_super) {
+ __extends(AbortError, _super);
+ /**
+ * @param message - error message
+ */
+ function AbortError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "AbortError", "The operation was aborted. " + message) || this;
+ }
+ return AbortError;
+}(DOMException));
+exports.AbortError = AbortError;
+var URLMismatchError = /** @class */ (function (_super) {
+ __extends(URLMismatchError, _super);
+ /**
+ * @param message - error message
+ */
+ function URLMismatchError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "URLMismatchError", "The given URL does not match another URL. " + message) || this;
+ }
+ return URLMismatchError;
+}(DOMException));
+exports.URLMismatchError = URLMismatchError;
+var QuotaExceededError = /** @class */ (function (_super) {
+ __extends(QuotaExceededError, _super);
+ /**
+ * @param message - error message
+ */
+ function QuotaExceededError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "QuotaExceededError", "The quota has been exceeded. " + message) || this;
+ }
+ return QuotaExceededError;
+}(DOMException));
+exports.QuotaExceededError = QuotaExceededError;
+var TimeoutError = /** @class */ (function (_super) {
+ __extends(TimeoutError, _super);
+ /**
+ * @param message - error message
+ */
+ function TimeoutError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "TimeoutError", "The operation timed out. " + message) || this;
+ }
+ return TimeoutError;
+}(DOMException));
+exports.TimeoutError = TimeoutError;
+var InvalidNodeTypeError = /** @class */ (function (_super) {
+ __extends(InvalidNodeTypeError, _super);
+ /**
+ * @param message - error message
+ */
+ function InvalidNodeTypeError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "InvalidNodeTypeError", "The supplied node is incorrect or has an incorrect ancestor for this operation. " + message) || this;
+ }
+ return InvalidNodeTypeError;
+}(DOMException));
+exports.InvalidNodeTypeError = InvalidNodeTypeError;
+var DataCloneError = /** @class */ (function (_super) {
+ __extends(DataCloneError, _super);
+ /**
+ * @param message - error message
+ */
+ function DataCloneError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "DataCloneError", "The object can not be cloned. " + message) || this;
+ }
+ return DataCloneError;
+}(DOMException));
+exports.DataCloneError = DataCloneError;
+var NotImplementedError = /** @class */ (function (_super) {
+ __extends(NotImplementedError, _super);
+ /**
+ * @param message - error message
+ */
+ function NotImplementedError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "NotImplementedError", "The DOM method is not implemented by this module. " + message) || this;
+ }
+ return NotImplementedError;
+}(DOMException));
+exports.NotImplementedError = NotImplementedError;
+var HierarchyRequestError = /** @class */ (function (_super) {
+ __extends(HierarchyRequestError, _super);
+ /**
+ * @param message - error message
+ */
+ function HierarchyRequestError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "HierarchyRequestError", "The operation would yield an incorrect node tree. " + message) || this;
+ }
+ return HierarchyRequestError;
+}(DOMException));
+exports.HierarchyRequestError = HierarchyRequestError;
+var NotFoundError = /** @class */ (function (_super) {
+ __extends(NotFoundError, _super);
+ /**
+ * @param message - error message
+ */
+ function NotFoundError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "NotFoundError", "The object can not be found here. " + message) || this;
+ }
+ return NotFoundError;
+}(DOMException));
+exports.NotFoundError = NotFoundError;
+var IndexSizeError = /** @class */ (function (_super) {
+ __extends(IndexSizeError, _super);
+ /**
+ * @param message - error message
+ */
+ function IndexSizeError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "IndexSizeError", "The index is not in the allowed range. " + message) || this;
+ }
+ return IndexSizeError;
+}(DOMException));
+exports.IndexSizeError = IndexSizeError;
+var SyntaxError = /** @class */ (function (_super) {
+ __extends(SyntaxError, _super);
+ /**
+ * @param message - error message
+ */
+ function SyntaxError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "SyntaxError", "The string did not match the expected pattern. " + message) || this;
+ }
+ return SyntaxError;
+}(DOMException));
+exports.SyntaxError = SyntaxError;
+var InvalidCharacterError = /** @class */ (function (_super) {
+ __extends(InvalidCharacterError, _super);
+ /**
+ * @param message - error message
+ */
+ function InvalidCharacterError(message) {
+ if (message === void 0) { message = ""; }
+ return _super.call(this, "InvalidCharacterError", "The string contains invalid characters. " + message) || this;
+ }
+ return InvalidCharacterError;
+}(DOMException));
+exports.InvalidCharacterError = InvalidCharacterError;
+//# sourceMappingURL=DOMException.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DOMException.js.map b/node_modules/@oozcitak/dom/lib/dom/DOMException.js.map
new file mode 100644
index 0000000..7469f4c
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DOMException.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DOMException.js","sourceRoot":"","sources":["../../src/dom/DOMException.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH;IAAkC,gCAAK;IAMrC;;;;OAIG;IACH,sBAAY,IAAY,EAAE,OAAoB;QAApB,wBAAA,EAAA,YAAoB;QAA9C,YACE,kBAAM,OAAO,CAAC,SAGf;QADC,KAAI,CAAC,IAAI,GAAG,IAAI,CAAA;;IAClB,CAAC;IACH,mBAAC;AAAD,CAAC,AAhBD,CAAkC,KAAK,GAgBtC;AAhBY,oCAAY;AAkBzB;IAAwC,sCAAY;IAClD;;MAEE;IACF,4BAAY,OAAoB;QAApB,wBAAA,EAAA,YAAoB;eAC9B,kBAAM,oBAAoB,EAAE,OAAO,CAAC;IACtC,CAAC;IACH,yBAAC;AAAD,CAAC,AAPD,CAAwC,YAAY,GAOnD;AAPY,gDAAkB;AAS/B;IAAwC,sCAAY;IAClD;;MAEE;IACF,4BAAY,OAAoB;QAApB,wBAAA,EAAA,YAAoB;eAC9B,kBAAM,oBAAoB,EAAE,uCAAuC,GAAG,OAAO,CAAC;IAChF,CAAC;IACH,yBAAC;AAAD,CAAC,AAPD,CAAwC,YAAY,GAOnD;AAPY,gDAAkB;AAS/B;IAAwC,sCAAY;IAClD;;MAEE;IACF,4BAAY,OAAoB;QAApB,wBAAA,EAAA,YAAoB;eAC9B,kBAAM,oBAAoB,EAAE,OAAO,CAAC;IACtC,CAAC;IACH,yBAAC;AAAD,CAAC,AAPD,CAAwC,YAAY,GAOnD;AAPY,gDAAkB;AAS/B;IAAgD,8CAAY;IAC1D;;MAEE;IACF,oCAAY,OAAoB;QAApB,wBAAA,EAAA,YAAoB;eAC9B,kBAA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IAA2C,yCAAY;IACrD;;OAEG;IACH,+BAAY,OAAoB;QAApB,wBAAA,EAAA,YAAoB;eAC9B,kBAAM,uBAAuB,EAAE,oDAAoD,GAAG,OAAO,CAAC;IAChG,CAAC;IACH,4BAAC;AAAD,CAAC,AAPD,CAA2C,YAAY,GAOtD;AAPY,sDAAqB;AASlC;IAAmC,iCAAY;IAC7C;;OAEG;IACH,uBAAY,OAAoB;QAApB,wBAAA,EAAA,YAAoB;eAC9B,kBAAM,eAAe,EAAE,oCAAoC,GAAG,OAAO,CAAC;IACxE,CAAC;IACH,oBAAC;AAAD,CAAC,AAPD,CAAmC,YAAY,GAO9C;AAPY,sCAAa;AAS1B;IAAoC,kCAAY;IAC9C;;OAEG;IACH,wBAAY,OAAoB;QAApB,wBAAA,EAAA,YAAoB;eAC9B,kBAAM,gBAAgB,EAAE,yCAAyC,GAAG,OAAO,CAAC;IAC9E,CAAC;IACH,qBAAC;AAAD,CAAC,AAPD,CAAoC,YAAY,GAO/C;AAPY,wCAAc;AAS3B;IAAiC,+BAAY;IAC3C;;OAEG;IACH,qBAAY,OAAoB;QAApB,wBAAA,EAAA,YAAoB;eAC9B,kBAAM,aAAa,EAAE,iDAAiD,GAAG,OAAO,CAAC;IACnF,CAAC;IACH,kBAAC;AAAD,CAAC,AAPD,CAAiC,YAAY,GAO5C;AAPY,kCAAW;AASxB;IAA2C,yCAAY;IACrD;;OAEG;IACH,+BAAY,OAAoB;QAApB,wBAAA,EAAA,YAAoB;eAC9B,kBAAM,uBAAuB,EAAE,0CAA0C,GAAG,OAAO,CAAC;IACtF,CAAC;IACH,4BAAC;AAAD,CAAC,AAPD,CAA2C,YAAY,GAOtD;AAPY,sDAAqB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DOMImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/DOMImpl.d.ts
new file mode 100644
index 0000000..1d1f2ef
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DOMImpl.d.ts
@@ -0,0 +1,48 @@
+import { DOMFeatures, Window, Node, Range } from "./interfaces";
+import { CompareCache, FixedSizeSet } from "@oozcitak/util";
+/**
+ * Represents an object implementing DOM algorithms.
+ */
+declare class DOMImpl {
+ private static _instance;
+ private _features;
+ private _window;
+ private _compareCache;
+ private _rangeList;
+ /**
+ * Initializes a new instance of `DOM`.
+ */
+ private constructor();
+ /**
+ * Sets DOM algorithm features.
+ *
+ * @param features - DOM features supported by algorithms. All features are
+ * enabled by default unless explicity disabled.
+ */
+ setFeatures(features?: Partial | boolean): void;
+ /**
+ * Gets DOM algorithm features.
+ */
+ get features(): DOMFeatures;
+ /**
+ * Gets the DOM window.
+ */
+ get window(): Window;
+ /**
+ * Gets the global node compare cache.
+ */
+ get compareCache(): CompareCache;
+ /**
+ * Gets the global range list.
+ */
+ get rangeList(): FixedSizeSet;
+ /**
+ * Returns the instance of `DOM`.
+ */
+ static get instance(): DOMImpl;
+}
+/**
+ * Represents an object implementing DOM algorithms.
+ */
+export declare const dom: DOMImpl;
+export {};
diff --git a/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js b/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js
new file mode 100644
index 0000000..77b201e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js
@@ -0,0 +1,100 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("@oozcitak/util");
+var CreateAlgorithm_1 = require("../algorithm/CreateAlgorithm");
+/**
+ * Represents an object implementing DOM algorithms.
+ */
+var DOMImpl = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `DOM`.
+ */
+ function DOMImpl() {
+ this._features = {
+ mutationObservers: true,
+ customElements: true,
+ slots: true,
+ steps: true
+ };
+ this._window = null;
+ this._compareCache = new util_1.CompareCache();
+ this._rangeList = new util_1.FixedSizeSet();
+ }
+ /**
+ * Sets DOM algorithm features.
+ *
+ * @param features - DOM features supported by algorithms. All features are
+ * enabled by default unless explicity disabled.
+ */
+ DOMImpl.prototype.setFeatures = function (features) {
+ if (features === undefined)
+ features = true;
+ if (util_1.isObject(features)) {
+ for (var key in features) {
+ this._features[key] = features[key] || false;
+ }
+ }
+ else {
+ // enable/disable all features
+ for (var key in this._features) {
+ this._features[key] = features;
+ }
+ }
+ };
+ Object.defineProperty(DOMImpl.prototype, "features", {
+ /**
+ * Gets DOM algorithm features.
+ */
+ get: function () { return this._features; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DOMImpl.prototype, "window", {
+ /**
+ * Gets the DOM window.
+ */
+ get: function () {
+ if (this._window === null) {
+ this._window = CreateAlgorithm_1.create_window();
+ }
+ return this._window;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DOMImpl.prototype, "compareCache", {
+ /**
+ * Gets the global node compare cache.
+ */
+ get: function () { return this._compareCache; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DOMImpl.prototype, "rangeList", {
+ /**
+ * Gets the global range list.
+ */
+ get: function () { return this._rangeList; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DOMImpl, "instance", {
+ /**
+ * Returns the instance of `DOM`.
+ */
+ get: function () {
+ if (!DOMImpl._instance) {
+ DOMImpl._instance = new DOMImpl();
+ }
+ return DOMImpl._instance;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return DOMImpl;
+}());
+/**
+ * Represents an object implementing DOM algorithms.
+ */
+exports.dom = DOMImpl.instance;
+//# sourceMappingURL=DOMImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js.map
new file mode 100644
index 0000000..7223e03
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DOMImpl.js","sourceRoot":"","sources":["../../src/dom/DOMImpl.ts"],"names":[],"mappings":";;AACA,uCAA2E;AAC3E,gEAA4D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C,OAAO,IAAI,CAAC,UAAU,CAAA,CAAC,CAAC;;;OAAA;IAK/D,sBAAW,mBAAQ;QAHnB;;WAEG;aACH;YACE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE;gBACtB,OAAO,CAAC,SAAS,GAAG,IAAI,OAAO,EAAE,CAAA;aAClC;YACD,OAAO,OAAO,CAAC,SAAS,CAAA;QAC1B,CAAC;;;OAAA;IACH,cAAC;AAAD,CAAC,AA5ED,IA4EC;AAED;;GAEG;AACU,QAAA,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.d.ts
new file mode 100644
index 0000000..70bd0ec
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.d.ts
@@ -0,0 +1,29 @@
+import { DocumentType, Document, XMLDocument, DOMImplementation } from "./interfaces";
+/**
+ * Represents an object providing methods which are not dependent on
+ * any particular document.
+ */
+export declare class DOMImplementationImpl implements DOMImplementation {
+ _ID: string;
+ _associatedDocument: Document;
+ /**
+ * Initializes a new instance of `DOMImplementation`.
+ *
+ * @param document - the associated document
+ */
+ constructor(document?: Document);
+ /** @inheritdoc */
+ createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;
+ /** @inheritdoc */
+ createDocument(namespace: string | null, qualifiedName: string, doctype?: DocumentType | null): XMLDocument;
+ /** @inheritdoc */
+ createHTMLDocument(title?: string): Document;
+ /** @inheritdoc */
+ hasFeature(): boolean;
+ /**
+ * Creates a new `DOMImplementation`.
+ *
+ * @param document - owner document
+ */
+ static _create(document: Document): DOMImplementationImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js b/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js
new file mode 100644
index 0000000..b978f3f
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js
@@ -0,0 +1,149 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("./DOMImpl");
+var infra_1 = require("@oozcitak/infra");
+var algorithm_1 = require("../algorithm");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+/**
+ * Represents an object providing methods which are not dependent on
+ * any particular document.
+ */
+var DOMImplementationImpl = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `DOMImplementation`.
+ *
+ * @param document - the associated document
+ */
+ function DOMImplementationImpl(document) {
+ this._associatedDocument = document || DOMImpl_1.dom.window.document;
+ }
+ /** @inheritdoc */
+ DOMImplementationImpl.prototype.createDocumentType = function (qualifiedName, publicId, systemId) {
+ /**
+ * 1. Validate qualifiedName.
+ * 2. Return a new doctype, with qualifiedName as its name, publicId as its
+ * public ID, and systemId as its system ID, and with its node document set
+ * to the associated document of the context object.
+ */
+ algorithm_1.namespace_validate(qualifiedName);
+ return algorithm_1.create_documentType(this._associatedDocument, qualifiedName, publicId, systemId);
+ };
+ /** @inheritdoc */
+ DOMImplementationImpl.prototype.createDocument = function (namespace, qualifiedName, doctype) {
+ if (doctype === void 0) { doctype = null; }
+ /**
+ * 1. Let document be a new XMLDocument.
+ */
+ var document = algorithm_1.create_xmlDocument();
+ /**
+ * 2. Let element be null.
+ * 3. If qualifiedName is not the empty string, then set element to
+ * the result of running the internal createElementNS steps, given document,
+ * namespace, qualifiedName, and an empty dictionary.
+ */
+ var element = null;
+ if (qualifiedName) {
+ element = algorithm_1.document_internalCreateElementNS(document, namespace, qualifiedName);
+ }
+ /**
+ * 4. If doctype is non-null, append doctype to document.
+ * 5. If element is non-null, append element to document.
+ */
+ if (doctype)
+ document.appendChild(doctype);
+ if (element)
+ document.appendChild(element);
+ /**
+ * 6. document’s origin is context object’s associated document’s origin.
+ */
+ document._origin = this._associatedDocument._origin;
+ /**
+ * 7. document’s content type is determined by namespace:
+ * - HTML namespace
+ * application/xhtml+xml
+ * - SVG namespace
+ * image/svg+xml
+ * - Any other namespace
+ * application/xml
+ */
+ if (namespace === infra_1.namespace.HTML)
+ document._contentType = "application/xhtml+xml";
+ else if (namespace === infra_1.namespace.SVG)
+ document._contentType = "image/svg+xml";
+ else
+ document._contentType = "application/xml";
+ /**
+ * 8. Return document.
+ */
+ return document;
+ };
+ /** @inheritdoc */
+ DOMImplementationImpl.prototype.createHTMLDocument = function (title) {
+ /**
+ * 1. Let doc be a new document that is an HTML document.
+ * 2. Set doc’s content type to "text/html".
+ */
+ var doc = algorithm_1.create_document();
+ doc._type = "html";
+ doc._contentType = "text/html";
+ /**
+ * 3. Append a new doctype, with "html" as its name and with its node
+ * document set to doc, to doc.
+ */
+ doc.appendChild(algorithm_1.create_documentType(doc, "html", "", ""));
+ /**
+ * 4. Append the result of creating an element given doc, html, and the
+ * HTML namespace, to doc.
+ */
+ var htmlElement = algorithm_1.element_createAnElement(doc, "html", infra_1.namespace.HTML);
+ doc.appendChild(htmlElement);
+ /**
+ * 5. Append the result of creating an element given doc, head, and the
+ * HTML namespace, to the html element created earlier.
+ */
+ var headElement = algorithm_1.element_createAnElement(doc, "head", infra_1.namespace.HTML);
+ htmlElement.appendChild(headElement);
+ /**
+ * 6. If title is given:
+ * 6.1. Append the result of creating an element given doc, title, and
+ * the HTML namespace, to the head element created earlier.
+ * 6.2. Append a new Text node, with its data set to title (which could
+ * be the empty string) and its node document set to doc, to the title
+ * element created earlier.
+ */
+ if (title !== undefined) {
+ var titleElement = algorithm_1.element_createAnElement(doc, "title", infra_1.namespace.HTML);
+ headElement.appendChild(titleElement);
+ var textElement = algorithm_1.create_text(doc, title);
+ titleElement.appendChild(textElement);
+ }
+ /**
+ * 7. Append the result of creating an element given doc, body, and the
+ * HTML namespace, to the html element created earlier.
+ */
+ var bodyElement = algorithm_1.element_createAnElement(doc, "body", infra_1.namespace.HTML);
+ htmlElement.appendChild(bodyElement);
+ /**
+ * 8. doc’s origin is context object’s associated document’s origin.
+ */
+ doc._origin = this._associatedDocument._origin;
+ /**
+ * 9. Return doc.
+ */
+ return doc;
+ };
+ /** @inheritdoc */
+ DOMImplementationImpl.prototype.hasFeature = function () { return true; };
+ /**
+ * Creates a new `DOMImplementation`.
+ *
+ * @param document - owner document
+ */
+ DOMImplementationImpl._create = function (document) {
+ return new DOMImplementationImpl(document);
+ };
+ return DOMImplementationImpl;
+}());
+exports.DOMImplementationImpl = DOMImplementationImpl;
+WebIDLAlgorithm_1.idl_defineConst(DOMImplementationImpl.prototype, "_ID", "@oozcitak/dom");
+//# sourceMappingURL=DOMImplementationImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js.map
new file mode 100644
index 0000000..84d13ea
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DOMImplementationImpl.js","sourceRoot":"","sources":["../../src/dom/DOMImplementationImpl.ts"],"names":[],"mappings":";;AAAA,qCAA+B;AAI/B,yCAA6D;AAC7D,0CAGqB;AACrB,gEAA8D;AAE9D;;;GAGG;AACH;IAKE;;;;OAIG;IACH,+BAAY,QAAmB;QAC7B,IAAI,CAAC,mBAAmB,GAAG,QAAQ,IAAI,aAAG,CAAC,MAAM,CAAC,QAAQ,CAAA;IAC5D,CAAC;IAED,kBAAkB;IAClB,kDAAkB,GAAlB,UAAmB,aAAqB,EACtC,QAAgB,EAAE,QAAgB;QAClC;;;;;WAKG;QACH,8BAAkB,CAAC,aAAa,CAAC,CAAA;QAEjC,OAAO,+BAAmB,CAAC,IAAI,CAAC,mBAAmB,EACjD,aAAa,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;IACtC,CAAC;IAED,kBAAkB;IAClB,8CAAc,GAAd,UAAe,SAAwB,EAAE,aAAqB,EAC5D,OAAmC;QAAnC,wBAAA,EAAA,cAAmC;QACnC;;WAEG;QACH,IAAM,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uB,CAAC,GAAG,EAAE,MAAM,EAAE,iBAAc,CAAC,IAAI,CAAC,CAAA;QAC7E,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAA;QAEpC;;;;;;;WAOG;QACH,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,IAAM,YAAY,GAAG,mCAAuB,CAAC,GAAG,EAAE,OAAO,EAAE,iBAAc,CAAC,IAAI,CAAC,CAAA;YAC/E,WAAW,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;YACrC,IAAM,WAAW,GAAG,uBAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;YAC3C,YAAY,CAAC,WAAW,CAAC,WAAW,CAAC,CAAA;SACtC;QAED;;;WAGG;QACH,IAAM,WAAW,GAAG,mCAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,iBAAc,CAAC,IAAI,CAAC,CAAA;QAC7E,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAA;QAEpC;;WAEG;QACH,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAA;QAE9C;;WAEG;QACH,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,kBAAkB;IAClB,0CAAU,GAAV,cAAwB,OAAO,IAAI,CAAA,CAAC,CAAC;IAErC;;;;OAIG;IACI,6BAAO,GAAd,UAAe,QAAkB;QAC/B,OAAO,IAAI,qBAAqB,CAAC,QAAQ,CAAC,CAAA;IAC5C,CAAC;IAEH,4BAAC;AAAD,CAAC,AA9JD,IA8JC;AA9JY,sDAAqB;AAgKlC,iCAAe,CAAC,qBAAqB,CAAC,SAAS,EAAE,KAAK,EAAE,eAAe,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.d.ts
new file mode 100644
index 0000000..106755f
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.d.ts
@@ -0,0 +1,46 @@
+import { DOMTokenList, Element, Attr } from "./interfaces";
+/**
+ * Represents a token set.
+ */
+export declare class DOMTokenListImpl implements DOMTokenList {
+ _element: Element;
+ _attribute: Attr;
+ _tokenSet: Set;
+ /**
+ * Initializes a new instance of `DOMTokenList`.
+ *
+ * @param element - associated element
+ * @param attribute - associated attribute
+ */
+ private constructor();
+ /** @inheritdoc */
+ get length(): number;
+ /** @inheritdoc */
+ item(index: number): string | null;
+ /** @inheritdoc */
+ contains(token: string): boolean;
+ /** @inheritdoc */
+ add(...tokens: string[]): void;
+ /** @inheritdoc */
+ remove(...tokens: string[]): void;
+ /** @inheritdoc */
+ toggle(token: string, force?: boolean | undefined): boolean;
+ /** @inheritdoc */
+ replace(token: string, newToken: string): boolean;
+ /** @inheritdoc */
+ supports(token: string): boolean;
+ /** @inheritdoc */
+ get value(): string;
+ set value(value: string);
+ /**
+ * Returns an iterator for the token set.
+ */
+ [Symbol.iterator](): Iterator;
+ /**
+ * Creates a new `DOMTokenList`.
+ *
+ * @param element - associated element
+ * @param attribute - associated attribute
+ */
+ static _create(element: Element, attribute: Attr): DOMTokenListImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js b/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js
new file mode 100644
index 0000000..10ef75e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js
@@ -0,0 +1,312 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("./DOMImpl");
+var DOMException_1 = require("./DOMException");
+var infra_1 = require("@oozcitak/infra");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents a token set.
+ */
+var DOMTokenListImpl = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `DOMTokenList`.
+ *
+ * @param element - associated element
+ * @param attribute - associated attribute
+ */
+ function DOMTokenListImpl(element, attribute) {
+ /**
+ * 1. Let element be associated element.
+ * 2. Let localName be associated attribute’s local name.
+ * 3. Let value be the result of getting an attribute value given element
+ * and localName.
+ * 4. Run the attribute change steps for element, localName, value, value,
+ * and null.
+ */
+ this._element = element;
+ this._attribute = attribute;
+ this._tokenSet = new Set();
+ var localName = attribute._localName;
+ var value = algorithm_1.element_getAnAttributeValue(element, localName);
+ // define a closure to be called when the associated attribute's value changes
+ var thisObj = this;
+ function updateTokenSet(element, localName, oldValue, value, namespace) {
+ /**
+ * 1. If localName is associated attribute’s local name, namespace is null,
+ * and value is null, then empty token set.
+ * 2. Otherwise, if localName is associated attribute’s local name,
+ * namespace is null, then set token set to value, parsed.
+ */
+ if (localName === thisObj._attribute._localName && namespace === null) {
+ if (!value)
+ thisObj._tokenSet.clear();
+ else
+ thisObj._tokenSet = algorithm_1.orderedSet_parse(value);
+ }
+ }
+ // add the closure to the associated element's attribute change steps
+ this._element._attributeChangeSteps.push(updateTokenSet);
+ if (DOMImpl_1.dom.features.steps) {
+ algorithm_1.dom_runAttributeChangeSteps(element, localName, value, value, null);
+ }
+ }
+ Object.defineProperty(DOMTokenListImpl.prototype, "length", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The length attribute' getter must return context object’s token set’s
+ * size.
+ */
+ return this._tokenSet.size;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ DOMTokenListImpl.prototype.item = function (index) {
+ var e_1, _a;
+ /**
+ * 1. If index is equal to or greater than context object’s token set’s
+ * size, then return null.
+ * 2. Return context object’s token set[index].
+ */
+ var i = 0;
+ try {
+ for (var _b = __values(this._tokenSet), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var token = _c.value;
+ if (i === index)
+ return token;
+ i++;
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ return null;
+ };
+ /** @inheritdoc */
+ DOMTokenListImpl.prototype.contains = function (token) {
+ /**
+ * The contains(token) method, when invoked, must return true if context
+ * object’s token set[token] exists, and false otherwise.
+ */
+ return this._tokenSet.has(token);
+ };
+ /** @inheritdoc */
+ DOMTokenListImpl.prototype.add = function () {
+ var e_2, _a;
+ var tokens = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ tokens[_i] = arguments[_i];
+ }
+ try {
+ /**
+ * 1. For each token in tokens:
+ * 1.1. If token is the empty string, then throw a "SyntaxError"
+ * DOMException.
+ * 1.2. If token contains any ASCII whitespace, then throw an
+ * "InvalidCharacterError" DOMException.
+ * 2. For each token in tokens, append token to context object’s token set.
+ * 3. Run the update steps.
+ */
+ for (var tokens_1 = __values(tokens), tokens_1_1 = tokens_1.next(); !tokens_1_1.done; tokens_1_1 = tokens_1.next()) {
+ var token = tokens_1_1.value;
+ if (token === '') {
+ throw new DOMException_1.SyntaxError("Cannot add an empty token.");
+ }
+ else if (infra_1.codePoint.ASCIIWhiteSpace.test(token)) {
+ throw new DOMException_1.InvalidCharacterError("Token cannot contain whitespace.");
+ }
+ else {
+ this._tokenSet.add(token);
+ }
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (tokens_1_1 && !tokens_1_1.done && (_a = tokens_1.return)) _a.call(tokens_1);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ algorithm_1.tokenList_updateSteps(this);
+ };
+ /** @inheritdoc */
+ DOMTokenListImpl.prototype.remove = function () {
+ var e_3, _a;
+ var tokens = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ tokens[_i] = arguments[_i];
+ }
+ try {
+ /**
+ * 1. For each token in tokens:
+ * 1.1. If token is the empty string, then throw a "SyntaxError"
+ * DOMException.
+ * 1.2. If token contains any ASCII whitespace, then throw an
+ * "InvalidCharacterError" DOMException.
+ * 2. For each token in tokens, remove token from context object’s token set.
+ * 3. Run the update steps.
+ */
+ for (var tokens_2 = __values(tokens), tokens_2_1 = tokens_2.next(); !tokens_2_1.done; tokens_2_1 = tokens_2.next()) {
+ var token = tokens_2_1.value;
+ if (token === '') {
+ throw new DOMException_1.SyntaxError("Cannot remove an empty token.");
+ }
+ else if (infra_1.codePoint.ASCIIWhiteSpace.test(token)) {
+ throw new DOMException_1.InvalidCharacterError("Token cannot contain whitespace.");
+ }
+ else {
+ this._tokenSet.delete(token);
+ }
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (tokens_2_1 && !tokens_2_1.done && (_a = tokens_2.return)) _a.call(tokens_2);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ algorithm_1.tokenList_updateSteps(this);
+ };
+ /** @inheritdoc */
+ DOMTokenListImpl.prototype.toggle = function (token, force) {
+ if (force === void 0) { force = undefined; }
+ /**
+ * 1. If token is the empty string, then throw a "SyntaxError" DOMException.
+ * 2. If token contains any ASCII whitespace, then throw an
+ * "InvalidCharacterError" DOMException.
+ */
+ if (token === '') {
+ throw new DOMException_1.SyntaxError("Cannot toggle an empty token.");
+ }
+ else if (infra_1.codePoint.ASCIIWhiteSpace.test(token)) {
+ throw new DOMException_1.InvalidCharacterError("Token cannot contain whitespace.");
+ }
+ /**
+ * 3. If context object’s token set[token] exists, then:
+ */
+ if (this._tokenSet.has(token)) {
+ /**
+ * 3.1. If force is either not given or is false, then remove token from
+ * context object’s token set, run the update steps and return false.
+ * 3.2. Return true.
+ */
+ if (force === undefined || force === false) {
+ this._tokenSet.delete(token);
+ algorithm_1.tokenList_updateSteps(this);
+ return false;
+ }
+ return true;
+ }
+ /**
+ * 4. Otherwise, if force not given or is true, append token to context
+ * object’s token set, run the update steps, and return true.
+ */
+ if (force === undefined || force === true) {
+ this._tokenSet.add(token);
+ algorithm_1.tokenList_updateSteps(this);
+ return true;
+ }
+ /**
+ * 5. Return false.
+ */
+ return false;
+ };
+ /** @inheritdoc */
+ DOMTokenListImpl.prototype.replace = function (token, newToken) {
+ /**
+ * 1. If either token or newToken is the empty string, then throw a
+ * "SyntaxError" DOMException.
+ * 2. If either token or newToken contains any ASCII whitespace, then throw
+ * an "InvalidCharacterError" DOMException.
+ */
+ if (token === '' || newToken === '') {
+ throw new DOMException_1.SyntaxError("Cannot replace an empty token.");
+ }
+ else if (infra_1.codePoint.ASCIIWhiteSpace.test(token) || infra_1.codePoint.ASCIIWhiteSpace.test(newToken)) {
+ throw new DOMException_1.InvalidCharacterError("Token cannot contain whitespace.");
+ }
+ /**
+ * 3. If context object’s token set does not contain token, then return
+ * false.
+ */
+ if (!this._tokenSet.has(token))
+ return false;
+ /**
+ * 4. Replace token in context object’s token set with newToken.
+ * 5. Run the update steps.
+ * 6. Return true.
+ */
+ infra_1.set.replace(this._tokenSet, token, newToken);
+ algorithm_1.tokenList_updateSteps(this);
+ return true;
+ };
+ /** @inheritdoc */
+ DOMTokenListImpl.prototype.supports = function (token) {
+ /**
+ * 1. Let result be the return value of validation steps called with token.
+ * 2. Return result.
+ */
+ return algorithm_1.tokenList_validationSteps(this, token);
+ };
+ Object.defineProperty(DOMTokenListImpl.prototype, "value", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The value attribute must return the result of running context object’s
+ * serialize steps.
+ */
+ return algorithm_1.tokenList_serializeSteps(this);
+ },
+ set: function (value) {
+ /**
+ * Setting the value attribute must set an attribute value for the
+ * associated element using associated attribute’s local name and the given
+ * value.
+ */
+ algorithm_1.element_setAnAttributeValue(this._element, this._attribute._localName, value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Returns an iterator for the token set.
+ */
+ DOMTokenListImpl.prototype[Symbol.iterator] = function () {
+ var it = this._tokenSet[Symbol.iterator]();
+ return {
+ next: function () {
+ return it.next();
+ }
+ };
+ };
+ /**
+ * Creates a new `DOMTokenList`.
+ *
+ * @param element - associated element
+ * @param attribute - associated attribute
+ */
+ DOMTokenListImpl._create = function (element, attribute) {
+ return new DOMTokenListImpl(element, attribute);
+ };
+ return DOMTokenListImpl;
+}());
+exports.DOMTokenListImpl = DOMTokenListImpl;
+//# sourceMappingURL=DOMTokenListImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js.map
new file mode 100644
index 0000000..251ac11
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DOMTokenListImpl.js","sourceRoot":"","sources":["../../src/dom/DOMTokenListImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAA+B;AAC/B,+CAAmE;AAEnE,yCAA8E;AAC9E,0CAIqB;AAErB;;GAEG;AACH;IAME;;;;;OAKG;IACH,0BAAoB,OAAgB,EAAE,SAAe;QAEnD;;;;;;;WAOG;QACH,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;QACvB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;QAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAA;QAE1B,IAAM,SAAS,GAAG,SAAS,CAAC,UAAU,CAAA;QACtC,IAAM,KAAK,GAAG,uCAA2B,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;QAE7D,8EAA8E;QAC9E,IAAM,OAAO,GAAG,IAAI,CAAA;QACpB,SAAS,cAAc,CAAC,OAAgB,EAAE,SAAiB,EACzD,QAAuB,EAAE,KAAoB,EAAE,SAAwB;YACvE;;;;;eAKG;YACH,IAAI,SAAS,KAAK,OAAO,CAAC,UAAU,CAAC,UAAU,IAAI,SAAS,KAAK,IAAI,EAAE;gBACrE,IAAI,CAAC,KAAK;oBAC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AAS,KAAa;QACpB;;;WAGG;QACH,OAAO,qCAAyB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IAC/C,CAAC;IAGD,sBAAI,mCAAK;QADT,kBAAkB;aAClB;YACE;;;eAGG;YACH,OAAO,oCAAwB,CAAC,IAAI,CAAC,CAAA;QACvC,CAAC;aACD,UAAU,KAAa;YACrB;;;;eAIG;YACH,uCAA2B,CAAC,IAAI,CAAC,QAAQ,EACvC,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;QACtC,CAAC;;;OATA;IAWD;;OAEG;IACH,2BAAC,MAAM,CAAC,QAAQ,CAAC,GAAjB;QACE,IAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QAE5C,OAAO;YACL,IAAI,EAAJ;gBACE,OAAO,EAAE,CAAC,IAAI,EAAE,CAAA;YAClB,CAAC;SACF,CAAA;IACH,CAAC;IAED;;;;;OAKG;IACI,wBAAO,GAAd,UAAe,OAAgB,EAAE,SAAe;QAC9C,OAAO,IAAI,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;IACjD,CAAC;IAEH,uBAAC;AAAD,CAAC,AApQD,IAoQC;AApQY,4CAAgB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.d.ts
new file mode 100644
index 0000000..ad8b694
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.d.ts
@@ -0,0 +1,32 @@
+import { Node, Element, NodeType, HTMLCollection, NodeList, DocumentFragment, Document } from "./interfaces";
+import { NodeImpl } from "./NodeImpl";
+/**
+ * Represents a document fragment in the XML tree.
+ */
+export declare class DocumentFragmentImpl extends NodeImpl implements DocumentFragment {
+ _nodeType: NodeType;
+ _children: Set;
+ _host: Element | null;
+ /**
+ * Initializes a new instance of `DocumentFragment`.
+ *
+ * @param host - shadow root's host element
+ */
+ constructor(host?: Element | null);
+ getElementById(elementId: string): Element | null;
+ get children(): HTMLCollection;
+ get firstElementChild(): Element | null;
+ get lastElementChild(): Element | null;
+ get childElementCount(): number;
+ prepend(...nodes: (Node | string)[]): void;
+ append(...nodes: (Node | string)[]): void;
+ querySelector(selectors: string): Element | null;
+ querySelectorAll(selectors: string): NodeList;
+ /**
+ * Creates a new `DocumentFragment`.
+ *
+ * @param document - owner document
+ * @param host - shadow root's host element
+ */
+ static _create(document: Document, host?: Element | null): DocumentFragmentImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js b/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js
new file mode 100644
index 0000000..852d87f
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js
@@ -0,0 +1,103 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("./interfaces");
+var NodeImpl_1 = require("./NodeImpl");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+/**
+ * Represents a document fragment in the XML tree.
+ */
+var DocumentFragmentImpl = /** @class */ (function (_super) {
+ __extends(DocumentFragmentImpl, _super);
+ /**
+ * Initializes a new instance of `DocumentFragment`.
+ *
+ * @param host - shadow root's host element
+ */
+ function DocumentFragmentImpl(host) {
+ if (host === void 0) { host = null; }
+ var _this = _super.call(this) || this;
+ _this._children = new Set();
+ _this._host = host;
+ return _this;
+ }
+ // MIXIN: NonElementParentNode
+ /* istanbul ignore next */
+ DocumentFragmentImpl.prototype.getElementById = function (elementId) { throw new Error("Mixin: NonElementParentNode not implemented."); };
+ Object.defineProperty(DocumentFragmentImpl.prototype, "children", {
+ // MIXIN: ParentNode
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: ParentNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentFragmentImpl.prototype, "firstElementChild", {
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: ParentNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentFragmentImpl.prototype, "lastElementChild", {
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: ParentNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentFragmentImpl.prototype, "childElementCount", {
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: ParentNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ /* istanbul ignore next */
+ DocumentFragmentImpl.prototype.prepend = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ParentNode not implemented.");
+ };
+ /* istanbul ignore next */
+ DocumentFragmentImpl.prototype.append = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ParentNode not implemented.");
+ };
+ /* istanbul ignore next */
+ DocumentFragmentImpl.prototype.querySelector = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); };
+ /* istanbul ignore next */
+ DocumentFragmentImpl.prototype.querySelectorAll = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); };
+ /**
+ * Creates a new `DocumentFragment`.
+ *
+ * @param document - owner document
+ * @param host - shadow root's host element
+ */
+ DocumentFragmentImpl._create = function (document, host) {
+ if (host === void 0) { host = null; }
+ var node = new DocumentFragmentImpl(host);
+ node._nodeDocument = document;
+ return node;
+ };
+ return DocumentFragmentImpl;
+}(NodeImpl_1.NodeImpl));
+exports.DocumentFragmentImpl = DocumentFragmentImpl;
+/**
+ * Initialize prototype properties
+ */
+WebIDLAlgorithm_1.idl_defineConst(DocumentFragmentImpl.prototype, "_nodeType", interfaces_1.NodeType.DocumentFragment);
+//# sourceMappingURL=DocumentFragmentImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js.map
new file mode 100644
index 0000000..ae0cedd
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DocumentFragmentImpl.js","sourceRoot":"","sources":["../../src/dom/DocumentFragmentImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAEqB;AACrB,uCAAqC;AACrC,gEAA8D;AAE9D;;GAEG;AACH;IAA0C,wCAAQ;IAOhD;;;;OAIG;IACH,8BAAmB,IAA2B;QAA3B,qBAAA,EAAA,WAA2B;QAA9C,YACE,iBAAO,SAGR;QAbD,eAAS,GAAc,IAAI,GAAG,EAAQ,CAAA;QAYpC,KAAI,CAAC,KAAK,GAAG,IAAI,CAAA;;IACnB,CAAC;IAED,8BAA8B;IAC9B,0BAA0B;IAC1B,6CAAc,GAAd,UAAe,SAAiB,IAAoB,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAA,CAAC,CAAC;IAIrH,sBAAI,0CAAQ;QAFZ,oBAAoB;QACpB,0BAA0B;aAC1B,cAAiC,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAA,CAAC,CAAC;;;OAAA;IAExF,sBAAI,mDAAiB;QADrB,0BAA0B;aAC1B,cAA0C,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAA,CAAC,CAAC;;;OAAA;IAEjG,s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_modules/@oozcitak/dom/lib/dom/DocumentImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.d.ts
new file mode 100644
index 0000000..e395ea1
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.d.ts
@@ -0,0 +1,116 @@
+import { DOMImplementation, DocumentType, Element, Text, NodeFilter, NodeType, Node, HTMLCollection, DocumentFragment, NodeList, WhatToShow, Attr, ProcessingInstruction, Comment, CDATASection, NodeIterator, TreeWalker, FilterResult, Range, Event, EventTarget, Document } from "./interfaces";
+import { NodeImpl } from "./NodeImpl";
+/**
+ * Represents a document node.
+ */
+export declare class DocumentImpl extends NodeImpl implements Document {
+ _nodeType: NodeType;
+ _children: Set;
+ _encoding: {
+ name: string;
+ labels: string[];
+ };
+ _contentType: string;
+ _URL: {
+ scheme: string;
+ username: string;
+ password: string;
+ host: null;
+ port: null;
+ path: string[];
+ query: null;
+ fragment: null;
+ _cannotBeABaseURLFlag: boolean;
+ _blobURLEntry: null;
+ };
+ _origin: null;
+ _type: "xml" | "html";
+ _mode: "no-quirks" | "quirks" | "limited-quirks";
+ protected _implementation?: DOMImplementation;
+ _documentElement: null;
+ _hasNamespaces: boolean;
+ _nodeDocumentOverwrite: Document | null;
+ get _nodeDocument(): Document;
+ set _nodeDocument(val: Document);
+ /**
+ * Initializes a new instance of `Document`.
+ */
+ constructor();
+ /** @inheritdoc */
+ get implementation(): DOMImplementation;
+ /** @inheritdoc */
+ get URL(): string;
+ /** @inheritdoc */
+ get documentURI(): string;
+ /** @inheritdoc */
+ get origin(): string;
+ /** @inheritdoc */
+ get compatMode(): string;
+ /** @inheritdoc */
+ get characterSet(): string;
+ /** @inheritdoc */
+ get charset(): string;
+ /** @inheritdoc */
+ get inputEncoding(): string;
+ /** @inheritdoc */
+ get contentType(): string;
+ /** @inheritdoc */
+ get doctype(): DocumentType | null;
+ /** @inheritdoc */
+ get documentElement(): Element | null;
+ /** @inheritdoc */
+ getElementsByTagName(qualifiedName: string): HTMLCollection;
+ /** @inheritdoc */
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollection;
+ /** @inheritdoc */
+ getElementsByClassName(classNames: string): HTMLCollection;
+ /** @inheritdoc */
+ createElement(localName: string, options?: string | {
+ is: string;
+ }): Element;
+ /** @inheritdoc */
+ createElementNS(namespace: string | null, qualifiedName: string, options?: string | {
+ is: string;
+ }): Element;
+ /** @inheritdoc */
+ createDocumentFragment(): DocumentFragment;
+ /** @inheritdoc */
+ createTextNode(data: string): Text;
+ /** @inheritdoc */
+ createCDATASection(data: string): CDATASection;
+ /** @inheritdoc */
+ createComment(data: string): Comment;
+ /** @inheritdoc */
+ createProcessingInstruction(target: string, data: string): ProcessingInstruction;
+ /** @inheritdoc */
+ importNode(node: Node, deep?: boolean): Node;
+ /** @inheritdoc */
+ adoptNode(node: Node): Node;
+ /** @inheritdoc */
+ createAttribute(localName: string): Attr;
+ /** @inheritdoc */
+ createAttributeNS(namespace: string, qualifiedName: string): Attr;
+ /** @inheritdoc */
+ createEvent(eventInterface: string): Event;
+ /** @inheritdoc */
+ createRange(): Range;
+ /** @inheritdoc */
+ createNodeIterator(root: Node, whatToShow?: WhatToShow, filter?: NodeFilter | ((node: Node) => FilterResult) | null): NodeIterator;
+ /** @inheritdoc */
+ createTreeWalker(root: Node, whatToShow?: WhatToShow, filter?: NodeFilter | ((node: Node) => FilterResult) | null): TreeWalker;
+ /**
+ * Gets the parent event target for the given event.
+ *
+ * @param event - an event
+ */
+ _getTheParent(event: Event): EventTarget | null;
+ getElementById(elementId: string): Element | null;
+ get children(): HTMLCollection;
+ get firstElementChild(): Element | null;
+ get lastElementChild(): Element | null;
+ get childElementCount(): number;
+ prepend(...nodes: (Node | string)[]): void;
+ append(...nodes: (Node | string)[]): void;
+ querySelector(selectors: string): Element | null;
+ querySelectorAll(selectors: string): NodeList;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js b/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js
new file mode 100644
index 0000000..148004e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js
@@ -0,0 +1,545 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("./DOMImpl");
+var interfaces_1 = require("./interfaces");
+var DOMException_1 = require("./DOMException");
+var NodeImpl_1 = require("./NodeImpl");
+var util_1 = require("../util");
+var util_2 = require("@oozcitak/util");
+var infra_1 = require("@oozcitak/infra");
+var URLAlgorithm_1 = require("@oozcitak/url/lib/URLAlgorithm");
+var algorithm_1 = require("../algorithm");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+/**
+ * Represents a document node.
+ */
+var DocumentImpl = /** @class */ (function (_super) {
+ __extends(DocumentImpl, _super);
+ /**
+ * Initializes a new instance of `Document`.
+ */
+ function DocumentImpl() {
+ var _this = _super.call(this) || this;
+ _this._children = new Set();
+ _this._encoding = {
+ name: "UTF-8",
+ labels: ["unicode-1-1-utf-8", "utf-8", "utf8"]
+ };
+ _this._contentType = 'application/xml';
+ _this._URL = {
+ scheme: "about",
+ username: "",
+ password: "",
+ host: null,
+ port: null,
+ path: ["blank"],
+ query: null,
+ fragment: null,
+ _cannotBeABaseURLFlag: true,
+ _blobURLEntry: null
+ };
+ _this._origin = null;
+ _this._type = "xml";
+ _this._mode = "no-quirks";
+ _this._documentElement = null;
+ _this._hasNamespaces = false;
+ _this._nodeDocumentOverwrite = null;
+ return _this;
+ }
+ Object.defineProperty(DocumentImpl.prototype, "_nodeDocument", {
+ get: function () { return this._nodeDocumentOverwrite || this; },
+ set: function (val) { this._nodeDocumentOverwrite = val; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "implementation", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The implementation attribute’s getter must return the DOMImplementation
+ * object that is associated with the document.
+ */
+ return this._implementation || (this._implementation = algorithm_1.create_domImplementation(this));
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "URL", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The URL attribute’s getter and documentURI attribute’s getter must return
+ * the URL, serialized.
+ * See: https://url.spec.whatwg.org/#concept-url-serializer
+ */
+ return URLAlgorithm_1.urlSerializer(this._URL);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "documentURI", {
+ /** @inheritdoc */
+ get: function () { return this.URL; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "origin", {
+ /** @inheritdoc */
+ get: function () {
+ return "null";
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "compatMode", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The compatMode attribute’s getter must return "BackCompat" if context
+ * object’s mode is "quirks", and "CSS1Compat" otherwise.
+ */
+ return this._mode === "quirks" ? "BackCompat" : "CSS1Compat";
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "characterSet", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The characterSet attribute’s getter, charset attribute’s getter, and
+ * inputEncoding attribute’s getter, must return context object’s
+ * encoding’s name.
+ */
+ return this._encoding.name;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "charset", {
+ /** @inheritdoc */
+ get: function () { return this._encoding.name; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "inputEncoding", {
+ /** @inheritdoc */
+ get: function () { return this._encoding.name; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "contentType", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The contentType attribute’s getter must return the content type.
+ */
+ return this._contentType;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "doctype", {
+ /** @inheritdoc */
+ get: function () {
+ var e_1, _a;
+ try {
+ /**
+ * The doctype attribute’s getter must return the child of the document
+ * that is a doctype, and null otherwise.
+ */
+ for (var _b = __values(this._children), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var child = _c.value;
+ if (util_1.Guard.isDocumentTypeNode(child))
+ return child;
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ return null;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "documentElement", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The documentElement attribute’s getter must return the document element.
+ */
+ return this._documentElement;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ DocumentImpl.prototype.getElementsByTagName = function (qualifiedName) {
+ /**
+ * The getElementsByTagName(qualifiedName) method, when invoked, must return
+ * the list of elements with qualified name qualifiedName for the context object.
+ */
+ return algorithm_1.node_listOfElementsWithQualifiedName(qualifiedName, this);
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.getElementsByTagNameNS = function (namespace, localName) {
+ /**
+ * The getElementsByTagNameNS(namespace, localName) method, when invoked,
+ * must return the list of elements with namespace namespace and local name
+ * localName for the context object.
+ */
+ return algorithm_1.node_listOfElementsWithNamespace(namespace, localName, this);
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.getElementsByClassName = function (classNames) {
+ /**
+ * The getElementsByClassName(classNames) method, when invoked, must return
+ * the list of elements with class names classNames for the context object.
+ */
+ return algorithm_1.node_listOfElementsWithClassNames(classNames, this);
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.createElement = function (localName, options) {
+ /**
+ * 1. If localName does not match the Name production, then throw an
+ * "InvalidCharacterError" DOMException.
+ * 2. If the context object is an HTML document, then set localName to
+ * localName in ASCII lowercase.
+ * 3. Let is be null.
+ * 4. If options is a dictionary and options’s is is present, then set is
+ * to it.
+ * 5. Let namespace be the HTML namespace, if the context object is an
+ * HTML document or context object’s content type is
+ * "application/xhtml+xml", and null otherwise.
+ * 6. Return the result of creating an element given the context object,
+ * localName, namespace, null, is, and with the synchronous custom elements
+ * flag set.
+ */
+ if (!algorithm_1.xml_isName(localName))
+ throw new DOMException_1.InvalidCharacterError();
+ if (this._type === "html")
+ localName = localName.toLowerCase();
+ var is = null;
+ if (options !== undefined) {
+ if (util_2.isString(options)) {
+ is = options;
+ }
+ else {
+ is = options.is;
+ }
+ }
+ var namespace = (this._type === "html" || this._contentType === "application/xhtml+xml") ?
+ infra_1.namespace.HTML : null;
+ return algorithm_1.element_createAnElement(this, localName, namespace, null, is, true);
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.createElementNS = function (namespace, qualifiedName, options) {
+ /**
+ * The createElementNS(namespace, qualifiedName, options) method, when
+ * invoked, must return the result of running the internal createElementNS
+ * steps, given context object, namespace, qualifiedName, and options.
+ */
+ return algorithm_1.document_internalCreateElementNS(this, namespace, qualifiedName, options);
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.createDocumentFragment = function () {
+ /**
+ * The createDocumentFragment() method, when invoked, must return a new
+ * DocumentFragment node with its node document set to the context object.
+ */
+ return algorithm_1.create_documentFragment(this);
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.createTextNode = function (data) {
+ /**
+ * The createTextNode(data) method, when invoked, must return a new Text
+ * node with its data set to data and node document set to the context object.
+ */
+ return algorithm_1.create_text(this, data);
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.createCDATASection = function (data) {
+ /**
+ * 1. If context object is an HTML document, then throw a
+ * "NotSupportedError" DOMException.
+ * 2. If data contains the string "]]>", then throw an
+ * "InvalidCharacterError" DOMException.
+ * 3. Return a new CDATASection node with its data set to data and node
+ * document set to the context object.
+ */
+ if (this._type === "html")
+ throw new DOMException_1.NotSupportedError();
+ if (data.indexOf(']]>') !== -1)
+ throw new DOMException_1.InvalidCharacterError();
+ return algorithm_1.create_cdataSection(this, data);
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.createComment = function (data) {
+ /**
+ * The createComment(data) method, when invoked, must return a new Comment
+ * node with its data set to data and node document set to the context object.
+ */
+ return algorithm_1.create_comment(this, data);
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.createProcessingInstruction = function (target, data) {
+ /**
+ * 1. If target does not match the Name production, then throw an
+ * "InvalidCharacterError" DOMException.
+ * 2. If data contains the string "?>", then throw an
+ * "InvalidCharacterError" DOMException.
+ * 3. Return a new ProcessingInstruction node, with target set to target,
+ * data set to data, and node document set to the context object.
+ */
+ if (!algorithm_1.xml_isName(target))
+ throw new DOMException_1.InvalidCharacterError();
+ if (data.indexOf("?>") !== -1)
+ throw new DOMException_1.InvalidCharacterError();
+ return algorithm_1.create_processingInstruction(this, target, data);
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.importNode = function (node, deep) {
+ if (deep === void 0) { deep = false; }
+ /**
+ * 1. If node is a document or shadow root, then throw a "NotSupportedError" DOMException.
+ */
+ if (util_1.Guard.isDocumentNode(node) || util_1.Guard.isShadowRoot(node))
+ throw new DOMException_1.NotSupportedError();
+ /**
+ * 2. Return a clone of node, with context object and the clone children flag set if deep is true.
+ */
+ return algorithm_1.node_clone(node, this, deep);
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.adoptNode = function (node) {
+ /**
+ * 1. If node is a document, then throw a "NotSupportedError" DOMException.
+ */
+ if (util_1.Guard.isDocumentNode(node))
+ throw new DOMException_1.NotSupportedError();
+ /**
+ * 2. If node is a shadow root, then throw a "HierarchyRequestError" DOMException.
+ */
+ if (util_1.Guard.isShadowRoot(node))
+ throw new DOMException_1.HierarchyRequestError();
+ /**
+ * 3. Adopt node into the context object.
+ * 4. Return node.
+ */
+ algorithm_1.document_adopt(node, this);
+ return node;
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.createAttribute = function (localName) {
+ /**
+ * 1. If localName does not match the Name production in XML, then throw
+ * an "InvalidCharacterError" DOMException.
+ * 2. If the context object is an HTML document, then set localName to
+ * localName in ASCII lowercase.
+ * 3. Return a new attribute whose local name is localName and node document
+ * is context object.
+ */
+ if (!algorithm_1.xml_isName(localName))
+ throw new DOMException_1.InvalidCharacterError();
+ if (this._type === "html") {
+ localName = localName.toLowerCase();
+ }
+ var attr = algorithm_1.create_attr(this, localName);
+ return attr;
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.createAttributeNS = function (namespace, qualifiedName) {
+ /**
+ * 1. Let namespace, prefix, and localName be the result of passing
+ * namespace and qualifiedName to validate and extract.
+ * 2. Return a new attribute whose namespace is namespace, namespace prefix
+ * is prefix, local name is localName, and node document is context object.
+ */
+ var _a = __read(algorithm_1.namespace_validateAndExtract(namespace, qualifiedName), 3), ns = _a[0], prefix = _a[1], localName = _a[2];
+ var attr = algorithm_1.create_attr(this, localName);
+ attr._namespace = ns;
+ attr._namespacePrefix = prefix;
+ return attr;
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.createEvent = function (eventInterface) {
+ return algorithm_1.event_createLegacyEvent(eventInterface);
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.createRange = function () {
+ /**
+ * The createRange() method, when invoked, must return a new live range
+ * with (context object, 0) as its start and end.
+ */
+ var range = algorithm_1.create_range();
+ range._start = [this, 0];
+ range._end = [this, 0];
+ return range;
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.createNodeIterator = function (root, whatToShow, filter) {
+ if (whatToShow === void 0) { whatToShow = interfaces_1.WhatToShow.All; }
+ if (filter === void 0) { filter = null; }
+ /**
+ * 1. Let iterator be a new NodeIterator object.
+ * 2. Set iterator’s root and iterator’s reference to root.
+ * 3. Set iterator’s pointer before reference to true.
+ * 4. Set iterator’s whatToShow to whatToShow.
+ * 5. Set iterator’s filter to filter.
+ * 6. Return iterator.
+ */
+ var iterator = algorithm_1.create_nodeIterator(root, root, true);
+ iterator._whatToShow = whatToShow;
+ iterator._iteratorCollection = algorithm_1.create_nodeList(root);
+ if (util_2.isFunction(filter)) {
+ iterator._filter = algorithm_1.create_nodeFilter();
+ iterator._filter.acceptNode = filter;
+ }
+ else {
+ iterator._filter = filter;
+ }
+ return iterator;
+ };
+ /** @inheritdoc */
+ DocumentImpl.prototype.createTreeWalker = function (root, whatToShow, filter) {
+ if (whatToShow === void 0) { whatToShow = interfaces_1.WhatToShow.All; }
+ if (filter === void 0) { filter = null; }
+ /**
+ * 1. Let walker be a new TreeWalker object.
+ * 2. Set walker’s root and walker’s current to root.
+ * 3. Set walker’s whatToShow to whatToShow.
+ * 4. Set walker’s filter to filter.
+ * 5. Return walker.
+ */
+ var walker = algorithm_1.create_treeWalker(root, root);
+ walker._whatToShow = whatToShow;
+ if (util_2.isFunction(filter)) {
+ walker._filter = algorithm_1.create_nodeFilter();
+ walker._filter.acceptNode = filter;
+ }
+ else {
+ walker._filter = filter;
+ }
+ return walker;
+ };
+ /**
+ * Gets the parent event target for the given event.
+ *
+ * @param event - an event
+ */
+ DocumentImpl.prototype._getTheParent = function (event) {
+ /**
+ * TODO: Implement realms
+ * A document’s get the parent algorithm, given an event, returns null if
+ * event’s type attribute value is "load" or document does not have a
+ * browsing context, and the document’s relevant global object otherwise.
+ */
+ if (event._type === "load") {
+ return null;
+ }
+ else {
+ return DOMImpl_1.dom.window;
+ }
+ };
+ // MIXIN: NonElementParentNode
+ /* istanbul ignore next */
+ DocumentImpl.prototype.getElementById = function (elementId) { throw new Error("Mixin: NonElementParentNode not implemented."); };
+ Object.defineProperty(DocumentImpl.prototype, "children", {
+ // MIXIN: DocumentOrShadowRoot
+ // No elements
+ // MIXIN: ParentNode
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: ParentNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "firstElementChild", {
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: ParentNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "lastElementChild", {
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: ParentNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentImpl.prototype, "childElementCount", {
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: ParentNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ /* istanbul ignore next */
+ DocumentImpl.prototype.prepend = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ParentNode not implemented.");
+ };
+ /* istanbul ignore next */
+ DocumentImpl.prototype.append = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ParentNode not implemented.");
+ };
+ /* istanbul ignore next */
+ DocumentImpl.prototype.querySelector = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); };
+ /* istanbul ignore next */
+ DocumentImpl.prototype.querySelectorAll = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); };
+ return DocumentImpl;
+}(NodeImpl_1.NodeImpl));
+exports.DocumentImpl = DocumentImpl;
+/**
+ * Initialize prototype properties
+ */
+WebIDLAlgorithm_1.idl_defineConst(DocumentImpl.prototype, "_nodeType", interfaces_1.NodeType.Document);
+//# sourceMappingURL=DocumentImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js.map
new file mode 100644
index 0000000..26ed430
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DocumentImpl.js","sourceRoot":"","sources":["../../src/dom/DocumentImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA+B;AAC/B,2CAKqB;AACrB,+CAEuB;AACvB,uCAAqC;AACrC,gCAA+B;AAC/B,uCAAqD;AACrD,yCAA6D;AAC7D,+DAA8D;AAC9D,0CASqB;AACrB,gEAA8D;AAE9D;;GAEG;AACH;IAAkC,gCAAQ;IAkCxC;;OAEG;IACH;QAAA,YACE,iBAAO,SACR;QApCD,eAAS,GAAG,IAAI,GAAG,EAAQ,CAAA;QAE3B,eAAS,GAAG;YACV,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,CAAC,mBAAmB,EAAE,OAAO,EAAE,MAAM,CAAC;SAC/C,CAAA;QACD,kBAAY,GAAG,iBAAiB,CAAA;QAChC,UAAI,GAAG;YACL,MAAM,EAAE,OAAO;YACf,QAAQ,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AC,CAAC;IAC1G,0BAA0B;IAC1B,uCAAgB,GAAhB,UAAiB,SAAiB,IAAc,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAA,CAAC,CAAC;IAEzG,mBAAC;AAAD,CAAC,AAjcD,CAAkC,mBAAQ,GAiczC;AAjcY,oCAAY;AAmczB;;GAEG;AACH,iCAAe,CAAC,YAAY,CAAC,SAAS,EAAE,WAAW,EAAE,qBAAQ,CAAC,QAAQ,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.d.ts
new file mode 100644
index 0000000..3fd1812
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.d.ts
@@ -0,0 +1,11 @@
+import { DocumentOrShadowRoot } from "./interfaces";
+/**
+ * Represents a mixin for an interface to be used to share APIs between
+ * documents and shadow roots. This mixin is implemented by
+ * {@link Document} and {@link ShadowRoot}.
+ *
+ * _Note:_ The DocumentOrShadowRoot mixin is expected to be used by other
+ * standards that want to define APIs shared between documents and shadow roots.
+ */
+export declare class DocumentOrShadowRootImpl implements DocumentOrShadowRoot {
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js b/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js
new file mode 100644
index 0000000..1afff54
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js
@@ -0,0 +1,17 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Represents a mixin for an interface to be used to share APIs between
+ * documents and shadow roots. This mixin is implemented by
+ * {@link Document} and {@link ShadowRoot}.
+ *
+ * _Note:_ The DocumentOrShadowRoot mixin is expected to be used by other
+ * standards that want to define APIs shared between documents and shadow roots.
+ */
+var DocumentOrShadowRootImpl = /** @class */ (function () {
+ function DocumentOrShadowRootImpl() {
+ }
+ return DocumentOrShadowRootImpl;
+}());
+exports.DocumentOrShadowRootImpl = DocumentOrShadowRootImpl;
+//# sourceMappingURL=DocumentOrShadowRootImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js.map
new file mode 100644
index 0000000..7f888b6
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DocumentOrShadowRootImpl.js","sourceRoot":"","sources":["../../src/dom/DocumentOrShadowRootImpl.ts"],"names":[],"mappings":";;AAEA;;;;;;;GAOG;AACH;IAAA;IAEA,CAAC;IAAD,+BAAC;AAAD,CAAC,AAFD,IAEC;AAFY,4DAAwB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.d.ts
new file mode 100644
index 0000000..6c709e9
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.d.ts
@@ -0,0 +1,39 @@
+import { Node, NodeType, DocumentType, Document } from "./interfaces";
+import { NodeImpl } from "./NodeImpl";
+/**
+ * Represents an object providing methods which are not dependent on
+ * any particular document
+ */
+export declare class DocumentTypeImpl extends NodeImpl implements DocumentType {
+ _nodeType: NodeType;
+ _name: string;
+ _publicId: string;
+ _systemId: string;
+ /**
+ * Initializes a new instance of `DocumentType`.
+ *
+ * @param name - name of the node
+ * @param publicId - `PUBLIC` identifier
+ * @param systemId - `SYSTEM` identifier
+ */
+ private constructor();
+ /** @inheritdoc */
+ get name(): string;
+ /** @inheritdoc */
+ get publicId(): string;
+ /** @inheritdoc */
+ get systemId(): string;
+ before(...nodes: (Node | string)[]): void;
+ after(...nodes: (Node | string)[]): void;
+ replaceWith(...nodes: (Node | string)[]): void;
+ remove(): void;
+ /**
+ * Creates a new `DocumentType`.
+ *
+ * @param document - owner document
+ * @param name - name of the node
+ * @param publicId - `PUBLIC` identifier
+ * @param systemId - `SYSTEM` identifier
+ */
+ static _create(document: Document, name: string, publicId?: string, systemId?: string): DocumentTypeImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js b/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js
new file mode 100644
index 0000000..f105b16
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js
@@ -0,0 +1,109 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("./interfaces");
+var NodeImpl_1 = require("./NodeImpl");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+/**
+ * Represents an object providing methods which are not dependent on
+ * any particular document
+ */
+var DocumentTypeImpl = /** @class */ (function (_super) {
+ __extends(DocumentTypeImpl, _super);
+ /**
+ * Initializes a new instance of `DocumentType`.
+ *
+ * @param name - name of the node
+ * @param publicId - `PUBLIC` identifier
+ * @param systemId - `SYSTEM` identifier
+ */
+ function DocumentTypeImpl(name, publicId, systemId) {
+ var _this = _super.call(this) || this;
+ _this._name = '';
+ _this._publicId = '';
+ _this._systemId = '';
+ _this._name = name;
+ _this._publicId = publicId;
+ _this._systemId = systemId;
+ return _this;
+ }
+ Object.defineProperty(DocumentTypeImpl.prototype, "name", {
+ /** @inheritdoc */
+ get: function () { return this._name; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentTypeImpl.prototype, "publicId", {
+ /** @inheritdoc */
+ get: function () { return this._publicId; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(DocumentTypeImpl.prototype, "systemId", {
+ /** @inheritdoc */
+ get: function () { return this._systemId; },
+ enumerable: true,
+ configurable: true
+ });
+ // MIXIN: ChildNode
+ /* istanbul ignore next */
+ DocumentTypeImpl.prototype.before = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ChildNode not implemented.");
+ };
+ /* istanbul ignore next */
+ DocumentTypeImpl.prototype.after = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ChildNode not implemented.");
+ };
+ /* istanbul ignore next */
+ DocumentTypeImpl.prototype.replaceWith = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ChildNode not implemented.");
+ };
+ /* istanbul ignore next */
+ DocumentTypeImpl.prototype.remove = function () { throw new Error("Mixin: ChildNode not implemented."); };
+ /**
+ * Creates a new `DocumentType`.
+ *
+ * @param document - owner document
+ * @param name - name of the node
+ * @param publicId - `PUBLIC` identifier
+ * @param systemId - `SYSTEM` identifier
+ */
+ DocumentTypeImpl._create = function (document, name, publicId, systemId) {
+ if (publicId === void 0) { publicId = ''; }
+ if (systemId === void 0) { systemId = ''; }
+ var node = new DocumentTypeImpl(name, publicId, systemId);
+ node._nodeDocument = document;
+ return node;
+ };
+ return DocumentTypeImpl;
+}(NodeImpl_1.NodeImpl));
+exports.DocumentTypeImpl = DocumentTypeImpl;
+/**
+ * Initialize prototype properties
+ */
+WebIDLAlgorithm_1.idl_defineConst(DocumentTypeImpl.prototype, "_nodeType", interfaces_1.NodeType.DocumentType);
+//# sourceMappingURL=DocumentTypeImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js.map
new file mode 100644
index 0000000..88a3d7b
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DocumentTypeImpl.js","sourceRoot":"","sources":["../../src/dom/DocumentTypeImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAqE;AACrE,uCAAqC;AACrC,gEAA8D;AAE9D;;;GAGG;AACH;IAAsC,oCAAQ;IAQ5C;;;;;;OAMG;IACH,0BAAoB,IAAY,EAAE,QAAgB,EAAE,QAAgB;QAApE,YACE,iBAAO,SAKR;QAjBD,WAAK,GAAW,EAAE,CAAA;QAClB,eAAS,GAAW,EAAE,CAAA;QACtB,eAAS,GAAW,EAAE,CAAA;QAYpB,KAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,KAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;QACzB,KAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;;IAC3B,CAAC;IAGD,sBAAI,kCAAI;QADR,kBAAkB;aAClB,cAAqB,OAAO,IAAI,CAAC,KAAK,CAAA,CAAC,CAAC;;;OAAA;IAGxC,sBAAI,sCAAQ;QADZ,kBAAkB;aAClB,cAAyB,OAAO,IAAI,CAAC,SAAS,CAAA,CAAC,CAAC;;;OAAA;IAGhD,sBAAI,sCAAQ;QADZ,kBAAkB;aAClB,cAAyB,OAAO,IAAI,CAAC,SAAS,CAAA,CAAC,CAAC;;;OAAA;IAEhD,mBAAmB;IACnB,0BAA0B;IAC1B,iCAAM,GAAN;QAAO,eAA2B;aAA3B,UAA2B,EAA3B,qBAA2B,EAA3B,IAA2B;YAA3B,0BAA2B;;QAAU,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;IAAC,CAAC;IAClG,0BAA0B;IAC1B,gCAAK,GAAL;QAAM,eAA2B;aAA3B,UAA2B,EAA3B,qBAA2B,EAA3B,IAA2B;YAA3B,0BAA2B;;QAAU,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;IAAC,CAAC;IACjG,0BAA0B;IAC1B,sCAAW,GAAX;QAAY,eAA2B;aAA3B,UAA2B,EAA3B,qBAA2B,EAA3B,IAA2B;YAA3B,0BAA2B;;QAAU,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;IAAC,CAAC;IACvG,0BAA0B;IAC1B,iCAAM,GAAN,cAAiB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA,CAAC,CAAC;IAEvE;;;;;;;OAOG;IACI,wBAAO,GAAd,UAAe,QAAkB,EAAE,IAAY,EAAE,QAAqB,EACpE,QAAqB;QAD0B,yBAAA,EAAA,aAAqB;QACpE,yBAAA,EAAA,aAAqB;QACrB,IAAM,IAAI,GAAG,IAAI,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;QAC3D,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAA;QAC7B,OAAO,IAAI,CAAA;IACb,CAAC;IAEH,uBAAC;AAAD,CAAC,AAzDD,CAAsC,mBAAQ,GAyD7C;AAzDY,4CAAgB;AA2D7B;;GAEG;AACH,iCAAe,CAAC,gBAAgB,CAAC,SAAS,EAAE,WAAW,EAAE,qBAAQ,CAAC,YAAY,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/ElementImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/ElementImpl.d.ts
new file mode 100644
index 0000000..09f92a5
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ElementImpl.d.ts
@@ -0,0 +1,132 @@
+import { Attr, NamedNodeMap, DOMTokenList, ShadowRoot, NodeType, Node, Document, Element, HTMLCollection, NodeList, ShadowRootMode, CustomElementDefinition, HTMLSlotElement, Slot, AttributeChangeStep } from "./interfaces";
+import { NodeImpl } from "./NodeImpl";
+/**
+ * Represents an element node.
+ */
+export declare class ElementImpl extends NodeImpl implements Element {
+ _nodeType: NodeType;
+ _children: Set;
+ _namespace: string | null;
+ _namespacePrefix: string | null;
+ _localName: string;
+ _customElementState: "undefined" | "failed" | "uncustomized" | "custom";
+ _customElementDefinition: CustomElementDefinition | null;
+ _is: string | null;
+ _shadowRoot: ShadowRoot | null;
+ _attributeList: NamedNodeMap;
+ _uniqueIdentifier?: string;
+ _attributeChangeSteps: AttributeChangeStep[];
+ _name: string;
+ _assignedSlot: Slot | null;
+ /**
+ * Initializes a new instance of `Element`.
+ */
+ constructor();
+ /** @inheritdoc */
+ get namespaceURI(): string | null;
+ /** @inheritdoc */
+ get prefix(): string | null;
+ /** @inheritdoc */
+ get localName(): string;
+ /** @inheritdoc */
+ get tagName(): string;
+ /** @inheritdoc */
+ get id(): string;
+ set id(value: string);
+ /** @inheritdoc */
+ get className(): string;
+ set className(value: string);
+ /** @inheritdoc */
+ get classList(): DOMTokenList;
+ /** @inheritdoc */
+ get slot(): string;
+ set slot(value: string);
+ /** @inheritdoc */
+ hasAttributes(): boolean;
+ /** @inheritdoc */
+ get attributes(): NamedNodeMap;
+ /** @inheritdoc */
+ getAttributeNames(): string[];
+ /** @inheritdoc */
+ getAttribute(qualifiedName: string): string | null;
+ /** @inheritdoc */
+ getAttributeNS(namespace: string, localName: string): string | null;
+ /** @inheritdoc */
+ setAttribute(qualifiedName: string, value: string): void;
+ /** @inheritdoc */
+ setAttributeNS(namespace: string, qualifiedName: string, value: string): void;
+ /** @inheritdoc */
+ removeAttribute(qualifiedName: string): void;
+ /** @inheritdoc */
+ removeAttributeNS(namespace: string, localName: string): void;
+ /** @inheritdoc */
+ hasAttribute(qualifiedName: string): boolean;
+ /** @inheritdoc */
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
+ /** @inheritdoc */
+ hasAttributeNS(namespace: string, localName: string): boolean;
+ /** @inheritdoc */
+ getAttributeNode(qualifiedName: string): Attr | null;
+ /** @inheritdoc */
+ getAttributeNodeNS(namespace: string, localName: string): Attr | null;
+ /** @inheritdoc */
+ setAttributeNode(attr: Attr): Attr | null;
+ /** @inheritdoc */
+ setAttributeNodeNS(attr: Attr): Attr | null;
+ /** @inheritdoc */
+ removeAttributeNode(attr: Attr): Attr;
+ /** @inheritdoc */
+ attachShadow(init: {
+ mode: ShadowRootMode;
+ }): ShadowRoot;
+ /** @inheritdoc */
+ get shadowRoot(): ShadowRoot | null;
+ /** @inheritdoc */
+ closest(selectors: string): Element | null;
+ /** @inheritdoc */
+ matches(selectors: string): boolean;
+ /** @inheritdoc */
+ webkitMatchesSelector(selectors: string): boolean;
+ /** @inheritdoc */
+ getElementsByTagName(qualifiedName: string): HTMLCollection;
+ /** @inheritdoc */
+ getElementsByTagNameNS(namespace: string, localName: string): HTMLCollection;
+ /** @inheritdoc */
+ getElementsByClassName(classNames: string): HTMLCollection;
+ /** @inheritdoc */
+ insertAdjacentElement(where: "beforebegin" | "afterbegin" | "beforeend" | "afterend", element: Element): Element | null;
+ /** @inheritdoc */
+ insertAdjacentText(where: "beforebegin" | "afterbegin" | "beforeend" | "afterend", data: string): void;
+ /**
+ * Returns the qualified name.
+ */
+ get _qualifiedName(): string;
+ /**
+ * Returns the upper-cased qualified name for a html element.
+ */
+ get _htmlUppercasedQualifiedName(): string;
+ get children(): HTMLCollection;
+ get firstElementChild(): Element | null;
+ get lastElementChild(): Element | null;
+ get childElementCount(): number;
+ prepend(...nodes: (Node | string)[]): void;
+ append(...nodes: (Node | string)[]): void;
+ querySelector(selectors: string): Element | null;
+ querySelectorAll(selectors: string): NodeList;
+ get previousElementSibling(): Element | null;
+ get nextElementSibling(): Element | null;
+ before(...nodes: (Node | string)[]): void;
+ after(...nodes: (Node | string)[]): void;
+ replaceWith(...nodes: (Node | string)[]): void;
+ remove(): void;
+ get assignedSlot(): HTMLSlotElement | null;
+ /**
+ * Creates a new `Element`.
+ *
+ * @param document - owner document
+ * @param localName - local name
+ * @param namespace - namespace
+ * @param prefix - namespace prefix
+ */
+ static _create(document: Document, localName: string, namespace?: string | null, namespacePrefix?: string | null): ElementImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js b/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js
new file mode 100644
index 0000000..29e9ac7
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js
@@ -0,0 +1,714 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("./interfaces");
+var NodeImpl_1 = require("./NodeImpl");
+var DOMException_1 = require("./DOMException");
+var infra_1 = require("@oozcitak/infra");
+var algorithm_1 = require("../algorithm");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+/**
+ * Represents an element node.
+ */
+var ElementImpl = /** @class */ (function (_super) {
+ __extends(ElementImpl, _super);
+ /**
+ * Initializes a new instance of `Element`.
+ */
+ function ElementImpl() {
+ var _this = _super.call(this) || this;
+ _this._children = new Set();
+ _this._namespace = null;
+ _this._namespacePrefix = null;
+ _this._localName = "";
+ _this._customElementState = "undefined";
+ _this._customElementDefinition = null;
+ _this._is = null;
+ _this._shadowRoot = null;
+ _this._attributeList = algorithm_1.create_namedNodeMap(_this);
+ _this._attributeChangeSteps = [];
+ _this._name = '';
+ _this._assignedSlot = null;
+ return _this;
+ }
+ Object.defineProperty(ElementImpl.prototype, "namespaceURI", {
+ /** @inheritdoc */
+ get: function () { return this._namespace; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ElementImpl.prototype, "prefix", {
+ /** @inheritdoc */
+ get: function () { return this._namespacePrefix; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ElementImpl.prototype, "localName", {
+ /** @inheritdoc */
+ get: function () { return this._localName; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ElementImpl.prototype, "tagName", {
+ /** @inheritdoc */
+ get: function () { return this._htmlUppercasedQualifiedName; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ElementImpl.prototype, "id", {
+ /** @inheritdoc */
+ get: function () {
+ return algorithm_1.element_getAnAttributeValue(this, "id");
+ },
+ set: function (value) {
+ algorithm_1.element_setAnAttributeValue(this, "id", value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ElementImpl.prototype, "className", {
+ /** @inheritdoc */
+ get: function () {
+ return algorithm_1.element_getAnAttributeValue(this, "class");
+ },
+ set: function (value) {
+ algorithm_1.element_setAnAttributeValue(this, "class", value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ElementImpl.prototype, "classList", {
+ /** @inheritdoc */
+ get: function () {
+ var attr = algorithm_1.element_getAnAttributeByName("class", this);
+ if (attr === null) {
+ attr = algorithm_1.create_attr(this._nodeDocument, "class");
+ }
+ return algorithm_1.create_domTokenList(this, attr);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ElementImpl.prototype, "slot", {
+ /** @inheritdoc */
+ get: function () {
+ return algorithm_1.element_getAnAttributeValue(this, "slot");
+ },
+ set: function (value) {
+ algorithm_1.element_setAnAttributeValue(this, "slot", value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ ElementImpl.prototype.hasAttributes = function () {
+ return this._attributeList.length !== 0;
+ };
+ Object.defineProperty(ElementImpl.prototype, "attributes", {
+ /** @inheritdoc */
+ get: function () { return this._attributeList; },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ ElementImpl.prototype.getAttributeNames = function () {
+ var e_1, _a;
+ /**
+ * The getAttributeNames() method, when invoked, must return the qualified
+ * names of the attributes in context object’s attribute list, in order,
+ * and a new list otherwise.
+ */
+ var names = [];
+ try {
+ for (var _b = __values(this._attributeList), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var attr = _c.value;
+ names.push(attr._qualifiedName);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ return names;
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.getAttribute = function (qualifiedName) {
+ /**
+ * 1. Let attr be the result of getting an attribute given qualifiedName
+ * and the context object.
+ * 2. If attr is null, return null.
+ * 3. Return attr’s value.
+ */
+ var attr = algorithm_1.element_getAnAttributeByName(qualifiedName, this);
+ return (attr ? attr._value : null);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.getAttributeNS = function (namespace, localName) {
+ /**
+ * 1. Let attr be the result of getting an attribute given namespace,
+ * localName, and the context object.
+ * 2. If attr is null, return null.
+ * 3. Return attr’s value.
+ */
+ var attr = algorithm_1.element_getAnAttributeByNamespaceAndLocalName(namespace, localName, this);
+ return (attr ? attr._value : null);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.setAttribute = function (qualifiedName, value) {
+ /**
+ * 1. If qualifiedName does not match the Name production in XML, then
+ * throw an "InvalidCharacterError" DOMException.
+ */
+ if (!algorithm_1.xml_isName(qualifiedName))
+ throw new DOMException_1.InvalidCharacterError();
+ /**
+ * 2. If the context object is in the HTML namespace and its node document
+ * is an HTML document, then set qualifiedName to qualifiedName in ASCII
+ * lowercase.
+ */
+ if (this._namespace === infra_1.namespace.HTML && this._nodeDocument._type === "html") {
+ qualifiedName = qualifiedName.toLowerCase();
+ }
+ /**
+ * 3. Let attribute be the first attribute in context object’s attribute
+ * list whose qualified name is qualifiedName, and null otherwise.
+ */
+ var attribute = null;
+ for (var i = 0; i < this._attributeList.length; i++) {
+ var attr = this._attributeList[i];
+ if (attr._qualifiedName === qualifiedName) {
+ attribute = attr;
+ break;
+ }
+ }
+ /**
+ * 4. If attribute is null, create an attribute whose local name is
+ * qualifiedName, value is value, and node document is context object’s
+ * node document, then append this attribute to context object, and
+ * then return.
+ */
+ if (attribute === null) {
+ attribute = algorithm_1.create_attr(this._nodeDocument, qualifiedName);
+ attribute._value = value;
+ algorithm_1.element_append(attribute, this);
+ return;
+ }
+ /**
+ * 5. Change attribute from context object to value.
+ */
+ algorithm_1.element_change(attribute, this, value);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.setAttributeNS = function (namespace, qualifiedName, value) {
+ /**
+ * 1. Let namespace, prefix, and localName be the result of passing
+ * namespace and qualifiedName to validate and extract.
+ * 2. Set an attribute value for the context object using localName, value,
+ * and also prefix and namespace.
+ */
+ var _a = __read(algorithm_1.namespace_validateAndExtract(namespace, qualifiedName), 3), ns = _a[0], prefix = _a[1], localName = _a[2];
+ algorithm_1.element_setAnAttributeValue(this, localName, value, prefix, ns);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.removeAttribute = function (qualifiedName) {
+ /**
+ * The removeAttribute(qualifiedName) method, when invoked, must remove an
+ * attribute given qualifiedName and the context object, and then return
+ * undefined.
+ */
+ algorithm_1.element_removeAnAttributeByName(qualifiedName, this);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.removeAttributeNS = function (namespace, localName) {
+ /**
+ * The removeAttributeNS(namespace, localName) method, when invoked, must
+ * remove an attribute given namespace, localName, and context object, and
+ * then return undefined.
+ */
+ algorithm_1.element_removeAnAttributeByNamespaceAndLocalName(namespace, localName, this);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.hasAttribute = function (qualifiedName) {
+ /**
+ * 1. If the context object is in the HTML namespace and its node document
+ * is an HTML document, then set qualifiedName to qualifiedName in ASCII
+ * lowercase.
+ * 2. Return true if the context object has an attribute whose qualified
+ * name is qualifiedName, and false otherwise.
+ */
+ if (this._namespace === infra_1.namespace.HTML && this._nodeDocument._type === "html") {
+ qualifiedName = qualifiedName.toLowerCase();
+ }
+ for (var i = 0; i < this._attributeList.length; i++) {
+ var attr = this._attributeList[i];
+ if (attr._qualifiedName === qualifiedName) {
+ return true;
+ }
+ }
+ return false;
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.toggleAttribute = function (qualifiedName, force) {
+ /**
+ * 1. If qualifiedName does not match the Name production in XML, then
+ * throw an "InvalidCharacterError" DOMException.
+ */
+ if (!algorithm_1.xml_isName(qualifiedName))
+ throw new DOMException_1.InvalidCharacterError();
+ /**
+ * 2. If the context object is in the HTML namespace and its node document
+ * is an HTML document, then set qualifiedName to qualifiedName in ASCII
+ * lowercase.
+ */
+ if (this._namespace === infra_1.namespace.HTML && this._nodeDocument._type === "html") {
+ qualifiedName = qualifiedName.toLowerCase();
+ }
+ /**
+ * 3. Let attribute be the first attribute in the context object’s attribute
+ * list whose qualified name is qualifiedName, and null otherwise.
+ */
+ var attribute = null;
+ for (var i = 0; i < this._attributeList.length; i++) {
+ var attr = this._attributeList[i];
+ if (attr._qualifiedName === qualifiedName) {
+ attribute = attr;
+ break;
+ }
+ }
+ if (attribute === null) {
+ /**
+ * 4. If attribute is null, then:
+ * 4.1. If force is not given or is true, create an attribute whose local
+ * name is qualifiedName, value is the empty string, and node document is
+ * the context object’s node document, then append this attribute to the
+ * context object, and then return true.
+ * 4.2. Return false.
+ */
+ if (force === undefined || force === true) {
+ attribute = algorithm_1.create_attr(this._nodeDocument, qualifiedName);
+ attribute._value = '';
+ algorithm_1.element_append(attribute, this);
+ return true;
+ }
+ return false;
+ }
+ else if (force === undefined || force === false) {
+ /**
+ * 5. Otherwise, if force is not given or is false, remove an attribute
+ * given qualifiedName and the context object, and then return false.
+ */
+ algorithm_1.element_removeAnAttributeByName(qualifiedName, this);
+ return false;
+ }
+ /**
+ * 6. Return true.
+ */
+ return true;
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.hasAttributeNS = function (namespace, localName) {
+ /**
+ * 1. If namespace is the empty string, set it to null.
+ * 2. Return true if the context object has an attribute whose namespace is
+ * namespace and local name is localName, and false otherwise.
+ */
+ var ns = namespace || null;
+ for (var i = 0; i < this._attributeList.length; i++) {
+ var attr = this._attributeList[i];
+ if (attr._namespace === ns && attr._localName === localName) {
+ return true;
+ }
+ }
+ return false;
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.getAttributeNode = function (qualifiedName) {
+ /**
+ * The getAttributeNode(qualifiedName) method, when invoked, must return the
+ * result of getting an attribute given qualifiedName and context object.
+ */
+ return algorithm_1.element_getAnAttributeByName(qualifiedName, this);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.getAttributeNodeNS = function (namespace, localName) {
+ /**
+ * The getAttributeNodeNS(namespace, localName) method, when invoked, must
+ * return the result of getting an attribute given namespace, localName, and
+ * the context object.
+ */
+ return algorithm_1.element_getAnAttributeByNamespaceAndLocalName(namespace, localName, this);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.setAttributeNode = function (attr) {
+ /**
+ * The setAttributeNode(attr) and setAttributeNodeNS(attr) methods, when
+ * invoked, must return the result of setting an attribute given attr and
+ * the context object.
+ */
+ return algorithm_1.element_setAnAttribute(attr, this);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.setAttributeNodeNS = function (attr) {
+ return algorithm_1.element_setAnAttribute(attr, this);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.removeAttributeNode = function (attr) {
+ /**
+ * 1. If context object’s attribute list does not contain attr, then throw
+ * a "NotFoundError" DOMException.
+ * 2. Remove attr from context object.
+ * 3. Return attr.
+ */
+ var found = false;
+ for (var i = 0; i < this._attributeList.length; i++) {
+ var attribute = this._attributeList[i];
+ if (attribute === attr) {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ throw new DOMException_1.NotFoundError();
+ algorithm_1.element_remove(attr, this);
+ return attr;
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.attachShadow = function (init) {
+ /**
+ * 1. If context object’s namespace is not the HTML namespace, then throw a
+ * "NotSupportedError" DOMException.
+ */
+ if (this._namespace !== infra_1.namespace.HTML)
+ throw new DOMException_1.NotSupportedError();
+ /**
+ * 2. If context object’s local name is not a valid custom element name,
+ * "article", "aside", "blockquote", "body", "div", "footer", "h1", "h2",
+ * "h3", "h4", "h5", "h6", "header", "main" "nav", "p", "section",
+ * or "span", then throw a "NotSupportedError" DOMException.
+ */
+ if (!algorithm_1.customElement_isValidCustomElementName(this._localName) &&
+ !algorithm_1.customElement_isValidShadowHostName(this._localName))
+ throw new DOMException_1.NotSupportedError();
+ /**
+ * 3. If context object’s local name is a valid custom element name,
+ * or context object’s is value is not null, then:
+ * 3.1. Let definition be the result of looking up a custom element
+ * definition given context object’s node document, its namespace, its
+ * local name, and its is value.
+ * 3.2. If definition is not null and definition’s disable shadow is true,
+ * then throw a "NotSupportedError" DOMException.
+ */
+ if (algorithm_1.customElement_isValidCustomElementName(this._localName) || this._is !== null) {
+ var definition = algorithm_1.customElement_lookUpACustomElementDefinition(this._nodeDocument, this._namespace, this._localName, this._is);
+ if (definition !== null && definition.disableShadow === true) {
+ throw new DOMException_1.NotSupportedError();
+ }
+ }
+ /**
+ * 4. If context object is a shadow host, then throw an "NotSupportedError"
+ * DOMException.
+ */
+ if (this._shadowRoot !== null)
+ throw new DOMException_1.NotSupportedError();
+ /**
+ * 5. Let shadow be a new shadow root whose node document is context
+ * object’s node document, host is context object, and mode is init’s mode.
+ * 6. Set context object’s shadow root to shadow.
+ * 7. Return shadow.
+ */
+ var shadow = algorithm_1.create_shadowRoot(this._nodeDocument, this);
+ shadow._mode = init.mode;
+ this._shadowRoot = shadow;
+ return shadow;
+ };
+ Object.defineProperty(ElementImpl.prototype, "shadowRoot", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * 1. Let shadow be context object’s shadow root.
+ * 2. If shadow is null or its mode is "closed", then return null.
+ * 3. Return shadow.
+ */
+ var shadow = this._shadowRoot;
+ if (shadow === null || shadow.mode === "closed")
+ return null;
+ else
+ return shadow;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ ElementImpl.prototype.closest = function (selectors) {
+ /**
+ * TODO: Selectors
+ * 1. Let s be the result of parse a selector from selectors. [SELECTORS4]
+ * 2. If s is failure, throw a "SyntaxError" DOMException.
+ * 3. Let elements be context object’s inclusive ancestors that are
+ * elements, in reverse tree order.
+ * 4. For each element in elements, if match a selector against an element,
+ * using s, element, and :scope element context object, returns success,
+ * return element. [SELECTORS4]
+ * 5. Return null.
+ */
+ throw new DOMException_1.NotImplementedError();
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.matches = function (selectors) {
+ /**
+ * TODO: Selectors
+ * 1. Let s be the result of parse a selector from selectors. [SELECTORS4]
+ * 2. If s is failure, throw a "SyntaxError" DOMException.
+ * 3. Return true if the result of match a selector against an element,
+ * using s, element, and :scope element context object, returns success,
+ * and false otherwise. [SELECTORS4]
+ */
+ throw new DOMException_1.NotImplementedError();
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.webkitMatchesSelector = function (selectors) {
+ return this.matches(selectors);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.getElementsByTagName = function (qualifiedName) {
+ /**
+ * The getElementsByTagName(qualifiedName) method, when invoked, must return
+ * the list of elements with qualified name qualifiedName for context
+ * object.
+ */
+ return algorithm_1.node_listOfElementsWithQualifiedName(qualifiedName, this);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.getElementsByTagNameNS = function (namespace, localName) {
+ /**
+ * The getElementsByTagNameNS(namespace, localName) method, when invoked,
+ * must return the list of elements with namespace namespace and local name
+ * localName for context object.
+ */
+ return algorithm_1.node_listOfElementsWithNamespace(namespace, localName, this);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.getElementsByClassName = function (classNames) {
+ /**
+ * The getElementsByClassName(classNames) method, when invoked, must return
+ * the list of elements with class names classNames for context object.
+ */
+ return algorithm_1.node_listOfElementsWithClassNames(classNames, this);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.insertAdjacentElement = function (where, element) {
+ /**
+ * The insertAdjacentElement(where, element) method, when invoked, must
+ * return the result of running insert adjacent, given context object,
+ * where, and element.
+ */
+ return algorithm_1.element_insertAdjacent(this, where, element);
+ };
+ /** @inheritdoc */
+ ElementImpl.prototype.insertAdjacentText = function (where, data) {
+ /**
+ * 1. Let text be a new Text node whose data is data and node document is
+ * context object’s node document.
+ * 2. Run insert adjacent, given context object, where, and text.
+ */
+ var text = algorithm_1.create_text(this._nodeDocument, data);
+ algorithm_1.element_insertAdjacent(this, where, text);
+ };
+ Object.defineProperty(ElementImpl.prototype, "_qualifiedName", {
+ /**
+ * Returns the qualified name.
+ */
+ get: function () {
+ /**
+ * An element’s qualified name is its local name if its namespace prefix is
+ * null, and its namespace prefix, followed by ":", followed by its
+ * local name, otherwise.
+ */
+ return (this._namespacePrefix ?
+ this._namespacePrefix + ':' + this._localName :
+ this._localName);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ElementImpl.prototype, "_htmlUppercasedQualifiedName", {
+ /**
+ * Returns the upper-cased qualified name for a html element.
+ */
+ get: function () {
+ /**
+ * 1. Let qualifiedName be context object’s qualified name.
+ * 2. If the context object is in the HTML namespace and its node document
+ * is an HTML document, then set qualifiedName to qualifiedName in ASCII
+ * uppercase.
+ * 3. Return qualifiedName.
+ */
+ var qualifiedName = this._qualifiedName;
+ if (this._namespace === infra_1.namespace.HTML && this._nodeDocument._type === "html") {
+ qualifiedName = qualifiedName.toUpperCase();
+ }
+ return qualifiedName;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ElementImpl.prototype, "children", {
+ // MIXIN: ParentNode
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: ParentNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ElementImpl.prototype, "firstElementChild", {
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: ParentNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ElementImpl.prototype, "lastElementChild", {
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: ParentNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ElementImpl.prototype, "childElementCount", {
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: ParentNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ /* istanbul ignore next */
+ ElementImpl.prototype.prepend = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ParentNode not implemented.");
+ };
+ /* istanbul ignore next */
+ ElementImpl.prototype.append = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ParentNode not implemented.");
+ };
+ /* istanbul ignore next */
+ ElementImpl.prototype.querySelector = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); };
+ /* istanbul ignore next */
+ ElementImpl.prototype.querySelectorAll = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); };
+ Object.defineProperty(ElementImpl.prototype, "previousElementSibling", {
+ // MIXIN: NonDocumentTypeChildNode
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: NonDocumentTypeChildNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ElementImpl.prototype, "nextElementSibling", {
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: NonDocumentTypeChildNode not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ // MIXIN: ChildNode
+ /* istanbul ignore next */
+ ElementImpl.prototype.before = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ChildNode not implemented.");
+ };
+ /* istanbul ignore next */
+ ElementImpl.prototype.after = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ChildNode not implemented.");
+ };
+ /* istanbul ignore next */
+ ElementImpl.prototype.replaceWith = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ throw new Error("Mixin: ChildNode not implemented.");
+ };
+ /* istanbul ignore next */
+ ElementImpl.prototype.remove = function () { throw new Error("Mixin: ChildNode not implemented."); };
+ Object.defineProperty(ElementImpl.prototype, "assignedSlot", {
+ // MIXIN: Slotable
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: Slotable not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Creates a new `Element`.
+ *
+ * @param document - owner document
+ * @param localName - local name
+ * @param namespace - namespace
+ * @param prefix - namespace prefix
+ */
+ ElementImpl._create = function (document, localName, namespace, namespacePrefix) {
+ if (namespace === void 0) { namespace = null; }
+ if (namespacePrefix === void 0) { namespacePrefix = null; }
+ var node = new ElementImpl();
+ node._localName = localName;
+ node._namespace = namespace;
+ node._namespacePrefix = namespacePrefix;
+ node._nodeDocument = document;
+ return node;
+ };
+ return ElementImpl;
+}(NodeImpl_1.NodeImpl));
+exports.ElementImpl = ElementImpl;
+/**
+ * Initialize prototype properties
+ */
+WebIDLAlgorithm_1.idl_defineConst(ElementImpl.prototype, "_nodeType", interfaces_1.NodeType.Element);
+//# sourceMappingURL=ElementImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js.map
new file mode 100644
index 0000000..829bef5
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ElementImpl.js","sourceRoot":"","sources":["../../src/dom/ElementImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAIqB;AACrB,uCAAqC;AACrC,+CAEuB;AACvB,yCAA6D;AAC7D,0CAaqB;AACrB,gEAA8D;AAE9D;;GAEG;AACH;IAAiC,+BAAQ;IAuBvC;;OAEG;IACH;QAAA,YACE,iBAAO,SACR;QAzBD,eAAS,GAAc,IAAI,GAAG,EAAQ,CAAA;QAEtC,gBAAU,GAAkB,IAAI,CAAA;QAChC,sBAAgB,GAAkB,IAAI,CAAA;QACtC,gBAAU,GAAW,EAAE,CAAA;QACvB,yBAAmB,GAAuD,WAAW,CAAA;QACrF,8BAAwB,GAAmC,IAAI,CAAA;QAC/D,SAAG,GAAkB,IAAI,CAAA;QAEzB,iBAAW,GAAsB,IAAI,CAAA;QAErC,oBAAc,GAAiB,+BAAmB,CAAC,KAAI,CAAC,CAAA;QAIxD,2BAAqB,GAA0B,EAAE,CAAA;QAEjD,WAAK,GAAW,EAAE,CAAA;QAClB,mBAAa,GAAgB,IAAI,CAAA;;IAOjC,CAAC;IAGD,sBAAI,qCAAY;QADhB,kBAAkB;aAClB,cAAoC,OAAO,IAAI,CAAC,UAAU,CAAA,C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BAAgB,GAAG,eAAe,CAAA;QAEvC,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAA;QAC7B,OAAO,IAAI,CAAA;IACb,CAAC;IACH,kBAAC;AAAD,CAAC,AAvmBD,CAAiC,mBAAQ,GAumBxC;AAvmBY,kCAAW;AAymBxB;;GAEG;AACH,iCAAe,CAAC,WAAW,CAAC,SAAS,EAAE,WAAW,EAAE,qBAAQ,CAAC,OAAO,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/EventImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/EventImpl.d.ts
new file mode 100644
index 0000000..879b7de
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/EventImpl.d.ts
@@ -0,0 +1,74 @@
+import { EventInit, EventTarget, EventPhase, PotentialEventTarget, EventPathItem, Event } from "./interfaces";
+/**
+ * Represents a DOM event.
+ */
+export declare class EventImpl implements Event {
+ static NONE: number;
+ static CAPTURING_PHASE: number;
+ static AT_TARGET: number;
+ static BUBBLING_PHASE: number;
+ NONE: number;
+ CAPTURING_PHASE: number;
+ AT_TARGET: number;
+ BUBBLING_PHASE: number;
+ _target: PotentialEventTarget;
+ _relatedTarget: PotentialEventTarget;
+ _touchTargetList: PotentialEventTarget[];
+ _path: EventPathItem[];
+ _currentTarget: PotentialEventTarget;
+ _eventPhase: EventPhase;
+ _stopPropagationFlag: boolean;
+ _stopImmediatePropagationFlag: boolean;
+ _canceledFlag: boolean;
+ _inPassiveListenerFlag: boolean;
+ _composedFlag: boolean;
+ _initializedFlag: boolean;
+ _dispatchFlag: boolean;
+ _isTrusted: boolean;
+ _type: string;
+ _bubbles: boolean;
+ _cancelable: boolean;
+ _timeStamp: number;
+ /**
+ * Initializes a new instance of `Event`.
+ */
+ constructor(type: string, eventInit?: EventInit);
+ /** @inheritdoc */
+ get type(): string;
+ /** @inheritdoc */
+ get target(): EventTarget | null;
+ /** @inheritdoc */
+ get srcElement(): EventTarget | null;
+ /** @inheritdoc */
+ get currentTarget(): EventTarget | null;
+ /** @inheritdoc */
+ composedPath(): EventTarget[];
+ /** @inheritdoc */
+ get eventPhase(): EventPhase;
+ /** @inheritdoc */
+ stopPropagation(): void;
+ /** @inheritdoc */
+ get cancelBubble(): boolean;
+ set cancelBubble(value: boolean);
+ /** @inheritdoc */
+ stopImmediatePropagation(): void;
+ /** @inheritdoc */
+ get bubbles(): boolean;
+ /** @inheritdoc */
+ get cancelable(): boolean;
+ /** @inheritdoc */
+ get returnValue(): boolean;
+ set returnValue(value: boolean);
+ /** @inheritdoc */
+ preventDefault(): void;
+ /** @inheritdoc */
+ get defaultPrevented(): boolean;
+ /** @inheritdoc */
+ get composed(): boolean;
+ /** @inheritdoc */
+ get isTrusted(): boolean;
+ /** @inheritdoc */
+ get timeStamp(): number;
+ /** @inheritdoc */
+ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/EventImpl.js b/node_modules/@oozcitak/dom/lib/dom/EventImpl.js
new file mode 100644
index 0000000..cd53b66
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/EventImpl.js
@@ -0,0 +1,313 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("./interfaces");
+var algorithm_1 = require("../algorithm");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+/**
+ * Represents a DOM event.
+ */
+var EventImpl = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `Event`.
+ */
+ function EventImpl(type, eventInit) {
+ this._target = null;
+ this._relatedTarget = null;
+ this._touchTargetList = [];
+ this._path = [];
+ this._currentTarget = null;
+ this._eventPhase = interfaces_1.EventPhase.None;
+ this._stopPropagationFlag = false;
+ this._stopImmediatePropagationFlag = false;
+ this._canceledFlag = false;
+ this._inPassiveListenerFlag = false;
+ this._composedFlag = false;
+ this._initializedFlag = false;
+ this._dispatchFlag = false;
+ this._isTrusted = false;
+ this._bubbles = false;
+ this._cancelable = false;
+ /**
+ * When a constructor of the Event interface, or of an interface that
+ * inherits from the Event interface, is invoked, these steps must be run,
+ * given the arguments type and eventInitDict:
+ * 1. Let event be the result of running the inner event creation steps with
+ * this interface, null, now, and eventInitDict.
+ * 2. Initialize event’s type attribute to type.
+ * 3. Return event.
+ */
+ this._type = type;
+ if (eventInit) {
+ this._bubbles = eventInit.bubbles || false;
+ this._cancelable = eventInit.cancelable || false;
+ this._composedFlag = eventInit.composed || false;
+ }
+ this._initializedFlag = true;
+ this._timeStamp = new Date().getTime();
+ }
+ Object.defineProperty(EventImpl.prototype, "type", {
+ /** @inheritdoc */
+ get: function () { return this._type; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(EventImpl.prototype, "target", {
+ /** @inheritdoc */
+ get: function () { return this._target; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(EventImpl.prototype, "srcElement", {
+ /** @inheritdoc */
+ get: function () { return this._target; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(EventImpl.prototype, "currentTarget", {
+ /** @inheritdoc */
+ get: function () { return this._currentTarget; },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ EventImpl.prototype.composedPath = function () {
+ /**
+ * 1. Let composedPath be an empty list.
+ * 2. Let path be the context object’s path.
+ * 3. If path is empty, then return composedPath.
+ * 4. Let currentTarget be the context object’s currentTarget attribute
+ * value.
+ * 5. Append currentTarget to composedPath.
+ * 6. Let currentTargetIndex be 0.
+ * 7. Let currentTargetHiddenSubtreeLevel be 0.
+ */
+ var composedPath = [];
+ var path = this._path;
+ if (path.length === 0)
+ return composedPath;
+ var currentTarget = this._currentTarget;
+ if (currentTarget === null) {
+ throw new Error("Event currentTarget is null.");
+ }
+ composedPath.push(currentTarget);
+ var currentTargetIndex = 0;
+ var currentTargetHiddenSubtreeLevel = 0;
+ /**
+ * 8. Let index be path’s size − 1.
+ * 9. While index is greater than or equal to 0:
+ */
+ var index = path.length - 1;
+ while (index >= 0) {
+ /**
+ * 9.1. If path[index]'s root-of-closed-tree is true, then increase
+ * currentTargetHiddenSubtreeLevel by 1.
+ * 9.2. If path[index]'s invocation target is currentTarget, then set
+ * currentTargetIndex to index and break.
+ * 9.3. If path[index]'s slot-in-closed-tree is true, then decrease
+ * currentTargetHiddenSubtreeLevel by 1.
+ * 9.4. Decrease index by 1.
+ */
+ if (path[index].rootOfClosedTree) {
+ currentTargetHiddenSubtreeLevel++;
+ }
+ if (path[index].invocationTarget === currentTarget) {
+ currentTargetIndex = index;
+ break;
+ }
+ if (path[index].slotInClosedTree) {
+ currentTargetHiddenSubtreeLevel--;
+ }
+ index--;
+ }
+ /**
+ * 10. Let currentHiddenLevel and maxHiddenLevel be
+ * currentTargetHiddenSubtreeLevel.
+ */
+ var currentHiddenLevel = currentTargetHiddenSubtreeLevel;
+ var maxHiddenLevel = currentTargetHiddenSubtreeLevel;
+ /**
+ * 11. Set index to currentTargetIndex − 1.
+ * 12. While index is greater than or equal to 0:
+ */
+ index = currentTargetIndex - 1;
+ while (index >= 0) {
+ /**
+ * 12.1. If path[index]'s root-of-closed-tree is true, then increase
+ * currentHiddenLevel by 1.
+ * 12.2. If currentHiddenLevel is less than or equal to maxHiddenLevel,
+ * then prepend path[index]'s invocation target to composedPath.
+ */
+ if (path[index].rootOfClosedTree) {
+ currentHiddenLevel++;
+ }
+ if (currentHiddenLevel <= maxHiddenLevel) {
+ composedPath.unshift(path[index].invocationTarget);
+ }
+ /**
+ * 12.3. If path[index]'s slot-in-closed-tree is true, then:
+ */
+ if (path[index].slotInClosedTree) {
+ /**
+ * 12.3.1. Decrease currentHiddenLevel by 1.
+ * 12.3.2. If currentHiddenLevel is less than maxHiddenLevel, then set
+ * maxHiddenLevel to currentHiddenLevel.
+ */
+ currentHiddenLevel--;
+ if (currentHiddenLevel < maxHiddenLevel) {
+ maxHiddenLevel = currentHiddenLevel;
+ }
+ }
+ /**
+ * 12.4. Decrease index by 1.
+ */
+ index--;
+ }
+ /**
+ * 13. Set currentHiddenLevel and maxHiddenLevel to
+ * currentTargetHiddenSubtreeLevel.
+ */
+ currentHiddenLevel = currentTargetHiddenSubtreeLevel;
+ maxHiddenLevel = currentTargetHiddenSubtreeLevel;
+ /**
+ * 14. Set index to currentTargetIndex + 1.
+ * 15. While index is less than path’s size:
+ */
+ index = currentTargetIndex + 1;
+ while (index < path.length) {
+ /**
+ * 15.1. If path[index]'s slot-in-closed-tree is true, then increase
+ * currentHiddenLevel by 1.
+ * 15.2. If currentHiddenLevel is less than or equal to maxHiddenLevel,
+ * then append path[index]'s invocation target to composedPath.
+ */
+ if (path[index].slotInClosedTree) {
+ currentHiddenLevel++;
+ }
+ if (currentHiddenLevel <= maxHiddenLevel) {
+ composedPath.push(path[index].invocationTarget);
+ }
+ /**
+ * 15.3. If path[index]'s root-of-closed-tree is true, then:
+ */
+ if (path[index].rootOfClosedTree) {
+ /**
+ * 15.3.1. Decrease currentHiddenLevel by 1.
+ * 15.3.2. If currentHiddenLevel is less than maxHiddenLevel, then set
+ * maxHiddenLevel to currentHiddenLevel.
+ */
+ currentHiddenLevel--;
+ if (currentHiddenLevel < maxHiddenLevel) {
+ maxHiddenLevel = currentHiddenLevel;
+ }
+ }
+ /**
+ * 15.4. Increase index by 1.
+ */
+ index++;
+ }
+ /**
+ * 16. Return composedPath.
+ */
+ return composedPath;
+ };
+ Object.defineProperty(EventImpl.prototype, "eventPhase", {
+ /** @inheritdoc */
+ get: function () { return this._eventPhase; },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ EventImpl.prototype.stopPropagation = function () { this._stopPropagationFlag = true; };
+ Object.defineProperty(EventImpl.prototype, "cancelBubble", {
+ /** @inheritdoc */
+ get: function () { return this._stopPropagationFlag; },
+ set: function (value) { if (value)
+ this.stopPropagation(); },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ EventImpl.prototype.stopImmediatePropagation = function () {
+ this._stopPropagationFlag = true;
+ this._stopImmediatePropagationFlag = true;
+ };
+ Object.defineProperty(EventImpl.prototype, "bubbles", {
+ /** @inheritdoc */
+ get: function () { return this._bubbles; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(EventImpl.prototype, "cancelable", {
+ /** @inheritdoc */
+ get: function () { return this._cancelable; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(EventImpl.prototype, "returnValue", {
+ /** @inheritdoc */
+ get: function () { return !this._canceledFlag; },
+ set: function (value) {
+ if (!value) {
+ algorithm_1.event_setTheCanceledFlag(this);
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ EventImpl.prototype.preventDefault = function () {
+ algorithm_1.event_setTheCanceledFlag(this);
+ };
+ Object.defineProperty(EventImpl.prototype, "defaultPrevented", {
+ /** @inheritdoc */
+ get: function () { return this._canceledFlag; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(EventImpl.prototype, "composed", {
+ /** @inheritdoc */
+ get: function () { return this._composedFlag; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(EventImpl.prototype, "isTrusted", {
+ /** @inheritdoc */
+ get: function () { return this._isTrusted; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(EventImpl.prototype, "timeStamp", {
+ /** @inheritdoc */
+ get: function () { return this._timeStamp; },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ EventImpl.prototype.initEvent = function (type, bubbles, cancelable) {
+ if (bubbles === void 0) { bubbles = false; }
+ if (cancelable === void 0) { cancelable = false; }
+ /**
+ * 1. If the context object’s dispatch flag is set, then return.
+ */
+ if (this._dispatchFlag)
+ return;
+ /**
+ * 2. Initialize the context object with type, bubbles, and cancelable.
+ */
+ algorithm_1.event_initialize(this, type, bubbles, cancelable);
+ };
+ EventImpl.NONE = 0;
+ EventImpl.CAPTURING_PHASE = 1;
+ EventImpl.AT_TARGET = 2;
+ EventImpl.BUBBLING_PHASE = 3;
+ return EventImpl;
+}());
+exports.EventImpl = EventImpl;
+/**
+ * Define constants on prototype.
+ */
+WebIDLAlgorithm_1.idl_defineConst(EventImpl.prototype, "NONE", 0);
+WebIDLAlgorithm_1.idl_defineConst(EventImpl.prototype, "CAPTURING_PHASE", 1);
+WebIDLAlgorithm_1.idl_defineConst(EventImpl.prototype, "AT_TARGET", 2);
+WebIDLAlgorithm_1.idl_defineConst(EventImpl.prototype, "BUBBLING_PHASE", 3);
+//# sourceMappingURL=EventImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/EventImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/EventImpl.js.map
new file mode 100644
index 0000000..bc5a949
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/EventImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"EventImpl.js","sourceRoot":"","sources":["../../src/dom/EventImpl.ts"],"names":[],"mappings":";;AAAA,2CAEqB;AACrB,0CAAyE;AACzE,gEAA8D;AAE9D;;GAEG;AACH;IAkCE;;OAEG;IACH,mBAAmB,IAAY,EAAE,SAAqB;QAzBtD,YAAO,GAAyB,IAAI,CAAA;QACpC,mBAAc,GAAyB,IAAI,CAAA;QAC3C,qBAAgB,GAA2B,EAAE,CAAA;QAC7C,UAAK,GAAoB,EAAE,CAAA;QAC3B,mBAAc,GAAyB,IAAI,CAAA;QAC3C,gBAAW,GAAe,uBAAU,CAAC,IAAI,CAAA;QAEzC,yBAAoB,GAAY,KAAK,CAAA;QACrC,kCAA6B,GAAY,KAAK,CAAA;QAC9C,kBAAa,GAAY,KAAK,CAAA;QAC9B,2BAAsB,GAAY,KAAK,CAAA;QACvC,kBAAa,GAAY,KAAK,CAAA;QAC9B,qBAAgB,GAAY,KAAK,CAAA;QACjC,kBAAa,GAAY,KAAK,CAAA;QAE9B,eAAU,GAAY,KAAK,CAAA;QAG3B,aAAQ,GAAY,KAAK,CAAA;QACzB,gBAAW,GAAY,KAAK,CAAA;QAQ1B;;;;;;;;WAQG;QACH,IAA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AhSY,8BAAS;AAkStB;;GAEG;AACH,iCAAe,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,EAAG,CAAC,CAAC,CAAA;AAChD,iCAAe,CAAC,SAAS,CAAC,SAAS,EAAE,iBAAiB,EAAG,CAAC,CAAC,CAAA;AAC3D,iCAAe,CAAC,SAAS,CAAC,SAAS,EAAE,WAAW,EAAG,CAAC,CAAC,CAAA;AACrD,iCAAe,CAAC,SAAS,CAAC,SAAS,EAAE,gBAAgB,EAAG,CAAC,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.d.ts
new file mode 100644
index 0000000..e60053f
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.d.ts
@@ -0,0 +1,30 @@
+import { Event, EventListener, EventTarget, AddEventListenerOptions, EventListenerOptions, EventListenerEntry, EventHandlerEntry } from "./interfaces";
+/**
+ * Represents a target to which an event can be dispatched.
+ */
+export declare abstract class EventTargetImpl implements EventTarget {
+ private __eventListenerList?;
+ get _eventListenerList(): EventListenerEntry[];
+ private __eventHandlerMap?;
+ get _eventHandlerMap(): {
+ [key: string]: EventHandlerEntry;
+ };
+ /**
+ * Initializes a new instance of `EventTarget`.
+ */
+ constructor();
+ /** @inheritdoc */
+ addEventListener(type: string, callback: EventListener | null | ((event: Event) => void), options?: AddEventListenerOptions | boolean): void;
+ /** @inheritdoc */
+ removeEventListener(type: string, callback: EventListener | null | ((event: Event) => void), options?: EventListenerOptions | boolean): void;
+ /** @inheritdoc */
+ dispatchEvent(event: Event): boolean;
+ /** @inheritdoc */
+ _getTheParent(event: Event): EventTarget | null;
+ /** @inheritdoc */
+ _activationBehavior?(event: Event): void;
+ /** @inheritdoc */
+ _legacyPreActivationBehavior?(event: Event): void;
+ /** @inheritdoc */
+ _legacyCanceledActivationBehavior?(event: Event): void;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js b/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js
new file mode 100644
index 0000000..7d90baf
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js
@@ -0,0 +1,133 @@
+"use strict";
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMException_1 = require("./DOMException");
+var util_1 = require("../util");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents a target to which an event can be dispatched.
+ */
+var EventTargetImpl = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `EventTarget`.
+ */
+ function EventTargetImpl() {
+ }
+ Object.defineProperty(EventTargetImpl.prototype, "_eventListenerList", {
+ get: function () {
+ return this.__eventListenerList || (this.__eventListenerList = []);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(EventTargetImpl.prototype, "_eventHandlerMap", {
+ get: function () {
+ return this.__eventHandlerMap || (this.__eventHandlerMap = {});
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ EventTargetImpl.prototype.addEventListener = function (type, callback, options) {
+ if (options === void 0) { options = { passive: false, once: false, capture: false }; }
+ /**
+ * 1. Let capture, passive, and once be the result of flattening more options.
+ */
+ var _a = __read(algorithm_1.eventTarget_flattenMore(options), 3), capture = _a[0], passive = _a[1], once = _a[2];
+ // convert callback function to EventListener, return if null
+ var listenerCallback;
+ if (!callback) {
+ return;
+ }
+ else if (util_1.Guard.isEventListener(callback)) {
+ listenerCallback = callback;
+ }
+ else {
+ listenerCallback = { handleEvent: callback };
+ }
+ /**
+ * 2. Add an event listener with the context object and an event listener
+ * whose type is type, callback is callback, capture is capture, passive is
+ * passive, and once is once.
+ */
+ algorithm_1.eventTarget_addEventListener(this, {
+ type: type,
+ callback: listenerCallback,
+ capture: capture,
+ passive: passive,
+ once: once,
+ removed: false
+ });
+ };
+ /** @inheritdoc */
+ EventTargetImpl.prototype.removeEventListener = function (type, callback, options) {
+ /**
+ * TODO: Implement realms
+ * 1. If the context object’s relevant global object is a
+ * ServiceWorkerGlobalScope object and its associated service worker’s
+ * script resource’s has ever been evaluated flag is set, then throw
+ * a TypeError. [SERVICE-WORKERS]
+ */
+ if (options === void 0) { options = { capture: false }; }
+ /**
+ * 2. Let capture be the result of flattening options.
+ */
+ var capture = algorithm_1.eventTarget_flatten(options);
+ if (!callback)
+ return;
+ /**
+ * 3. If the context object’s event listener list contains an event listener
+ * whose type is type, callback is callback, and capture is capture, then
+ * remove an event listener with the context object and that event listener.
+ */
+ for (var i = 0; i < this._eventListenerList.length; i++) {
+ var entry = this._eventListenerList[i];
+ if (entry.type !== type || entry.capture !== capture)
+ continue;
+ if (util_1.Guard.isEventListener(callback) && entry.callback === callback) {
+ algorithm_1.eventTarget_removeEventListener(this, entry, i);
+ break;
+ }
+ else if (callback && entry.callback.handleEvent === callback) {
+ algorithm_1.eventTarget_removeEventListener(this, entry, i);
+ break;
+ }
+ }
+ };
+ /** @inheritdoc */
+ EventTargetImpl.prototype.dispatchEvent = function (event) {
+ /**
+ * 1. If event’s dispatch flag is set, or if its initialized flag is not
+ * set, then throw an "InvalidStateError" DOMException.
+ * 2. Initialize event’s isTrusted attribute to false.
+ * 3. Return the result of dispatching event to the context object.
+ */
+ if (event._dispatchFlag || !event._initializedFlag) {
+ throw new DOMException_1.InvalidStateError();
+ }
+ event._isTrusted = false;
+ return algorithm_1.event_dispatch(event, this);
+ };
+ /** @inheritdoc */
+ EventTargetImpl.prototype._getTheParent = function (event) {
+ return null;
+ };
+ return EventTargetImpl;
+}());
+exports.EventTargetImpl = EventTargetImpl;
+//# sourceMappingURL=EventTargetImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js.map
new file mode 100644
index 0000000..bdd3198
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"EventTargetImpl.js","sourceRoot":"","sources":["../../src/dom/EventTargetImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAIA,+CAAkD;AAClD,gCAA+B;AAC/B,0CAGqB;AAErB;;GAEG;AACH;IAYE;;OAEG;IACH;IAAuB,CAAC;IAZxB,sBAAI,+CAAkB;aAAtB;YACE,OAAO,IAAI,CAAC,mBAAmB,IAAI,CAAC,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAC,CAAA;QACpE,CAAC;;;OAAA;IAGD,sBAAI,6CAAgB;aAApB;YACE,OAAO,IAAI,CAAC,iBAAiB,IAAI,CAAC,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC,CAAA;QAChE,CAAC;;;OAAA;IAOD,kBAAkB;IAClB,0CAAgB,GAAhB,UAAiB,IAAY,EAC3B,QAAyD,EACzD,OAA4F;QAA5F,wBAAA,EAAA,YAA+C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;QAE5F;;WAEG;QACG,IAAA,4DAA2D,EAA1D,eAAO,EAAE,eAAO,EAAE,YAAwC,CAAA;QAEjE,6DAA6D;QAC7D,IAAI,gBAA+B,CAAA;QACnC,IAAI,CAAC,QAAQ,EAAE;YACb,OAAM;SACP;aAAM,IAAI,YAAK,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE;YAC1C,gBAAgB,GAAG,QAAQ,CAAA;SAC5B;aAAM;YACL,gBAAgB,GAAG,EAAE,WAAW,EAA4B,QAAQ,EAAE,CAAA;SACvE;QAED;;;;WAIG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AClD,MAAM,IAAI,gCAAiB,EAAE,CAAA;SAC9B;QACD,KAAK,CAAC,UAAU,GAAG,KAAK,CAAA;QAExB,OAAO,0BAAc,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IACpC,CAAC;IAED,kBAAkB;IAClB,uCAAa,GAAb,UAAc,KAAY;QACxB,OAAO,IAAI,CAAA;IACb,CAAC;IAWH,sBAAC;AAAD,CAAC,AAxHD,IAwHC;AAxHqB,0CAAe"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.d.ts
new file mode 100644
index 0000000..1158b43
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.d.ts
@@ -0,0 +1,44 @@
+import { Node, Element, HTMLCollection } from "./interfaces";
+/**
+ * Represents a collection of elements.
+ */
+export declare class HTMLCollectionImpl implements HTMLCollection {
+ _live: boolean;
+ _root: Node;
+ _filter: ((element: Element) => boolean);
+ protected static reservedNames: string[];
+ /**
+ * Initializes a new instance of `HTMLCollection`.
+ *
+ * @param root - root node
+ * @param filter - node filter
+ */
+ private constructor();
+ /** @inheritdoc */
+ get length(): number;
+ /** @inheritdoc */
+ item(index: number): Element | null;
+ /** @inheritdoc */
+ namedItem(key: string): Element | null;
+ /** @inheritdoc */
+ [Symbol.iterator](): Iterator;
+ /** @inheritdoc */
+ [index: number]: Element | undefined;
+ /** @inheritdoc */
+ [key: string]: any;
+ /**
+ * Implements a proxy get trap to provide array-like access.
+ */
+ get(target: HTMLCollection, key: PropertyKey, receiver: any): Element | null | undefined;
+ /**
+ * Implements a proxy set trap to provide array-like access.
+ */
+ set(target: HTMLCollection, key: PropertyKey, value: Element, receiver: any): boolean;
+ /**
+ * Creates a new `HTMLCollection`.
+ *
+ * @param root - root node
+ * @param filter - node filter
+ */
+ static _create(root: Node, filter?: ((element: Element) => boolean)): HTMLCollectionImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js b/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js
new file mode 100644
index 0000000..4bf1f96
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js
@@ -0,0 +1,157 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var infra_1 = require("@oozcitak/infra");
+var algorithm_1 = require("../algorithm");
+var util_1 = require("../util");
+var util_2 = require("@oozcitak/util");
+/**
+ * Represents a collection of elements.
+ */
+var HTMLCollectionImpl = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `HTMLCollection`.
+ *
+ * @param root - root node
+ * @param filter - node filter
+ */
+ function HTMLCollectionImpl(root, filter) {
+ this._live = true;
+ this._root = root;
+ this._filter = filter;
+ return new Proxy(this, this);
+ }
+ Object.defineProperty(HTMLCollectionImpl.prototype, "length", {
+ /** @inheritdoc */
+ get: function () {
+ var _this = this;
+ /**
+ * The length attribute’s getter must return the number of nodes
+ * represented by the collection.
+ */
+ var count = 0;
+ var node = algorithm_1.tree_getFirstDescendantNode(this._root, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); });
+ while (node !== null) {
+ count++;
+ node = algorithm_1.tree_getNextDescendantNode(this._root, node, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); });
+ }
+ return count;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ HTMLCollectionImpl.prototype.item = function (index) {
+ var _this = this;
+ /**
+ * The item(index) method, when invoked, must return the indexth element
+ * in the collection. If there is no indexth element in the collection,
+ * then the method must return null.
+ */
+ var i = 0;
+ var node = algorithm_1.tree_getFirstDescendantNode(this._root, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); });
+ while (node !== null) {
+ if (i === index)
+ return node;
+ else
+ i++;
+ node = algorithm_1.tree_getNextDescendantNode(this._root, node, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); });
+ }
+ return null;
+ };
+ /** @inheritdoc */
+ HTMLCollectionImpl.prototype.namedItem = function (key) {
+ var _this = this;
+ /**
+ * 1. If key is the empty string, return null.
+ * 2. Return the first element in the collection for which at least one of
+ * the following is true:
+ * - it has an ID which is key;
+ * - it is in the HTML namespace and has a name attribute whose value is key;
+ * or null if there is no such element.
+ */
+ if (key === '')
+ return null;
+ var ele = algorithm_1.tree_getFirstDescendantNode(this._root, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); });
+ while (ele != null) {
+ if (ele._uniqueIdentifier === key) {
+ return ele;
+ }
+ else if (ele._namespace === infra_1.namespace.HTML) {
+ for (var i = 0; i < ele._attributeList.length; i++) {
+ var attr = ele._attributeList[i];
+ if (attr._localName === "name" && attr._namespace === null &&
+ attr._namespacePrefix === null && attr._value === key)
+ return ele;
+ }
+ }
+ ele = algorithm_1.tree_getNextDescendantNode(this._root, ele, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); });
+ }
+ return null;
+ };
+ /** @inheritdoc */
+ HTMLCollectionImpl.prototype[Symbol.iterator] = function () {
+ var root = this._root;
+ var filter = this._filter;
+ var currentNode = algorithm_1.tree_getFirstDescendantNode(root, false, false, function (e) { return util_1.Guard.isElementNode(e) && filter(e); });
+ return {
+ next: function () {
+ if (currentNode === null) {
+ return { done: true, value: null };
+ }
+ else {
+ var result = { done: false, value: currentNode };
+ currentNode = algorithm_1.tree_getNextDescendantNode(root, currentNode, false, false, function (e) { return util_1.Guard.isElementNode(e) && filter(e); });
+ return result;
+ }
+ }
+ };
+ };
+ /**
+ * Implements a proxy get trap to provide array-like access.
+ */
+ HTMLCollectionImpl.prototype.get = function (target, key, receiver) {
+ if (!util_2.isString(key) || HTMLCollectionImpl.reservedNames.indexOf(key) !== -1) {
+ return Reflect.get(target, key, receiver);
+ }
+ var index = Number(key);
+ if (isNaN(index)) {
+ return target.namedItem(key) || undefined;
+ }
+ else {
+ return target.item(index) || undefined;
+ }
+ };
+ /**
+ * Implements a proxy set trap to provide array-like access.
+ */
+ HTMLCollectionImpl.prototype.set = function (target, key, value, receiver) {
+ if (!util_2.isString(key) || HTMLCollectionImpl.reservedNames.indexOf(key) !== -1) {
+ return Reflect.set(target, key, value, receiver);
+ }
+ var index = Number(key);
+ var node = isNaN(index) ?
+ target.namedItem(key) || undefined : target.item(index) || undefined;
+ if (node && node._parent) {
+ algorithm_1.mutation_replace(node, value, node._parent);
+ return true;
+ }
+ else {
+ return false;
+ }
+ };
+ /**
+ * Creates a new `HTMLCollection`.
+ *
+ * @param root - root node
+ * @param filter - node filter
+ */
+ HTMLCollectionImpl._create = function (root, filter) {
+ if (filter === void 0) { filter = (function () { return true; }); }
+ return new HTMLCollectionImpl(root, filter);
+ };
+ HTMLCollectionImpl.reservedNames = ['_root', '_live', '_filter', 'length',
+ 'item', 'namedItem', 'get', 'set'];
+ return HTMLCollectionImpl;
+}());
+exports.HTMLCollectionImpl = HTMLCollectionImpl;
+//# sourceMappingURL=HTMLCollectionImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js.map
new file mode 100644
index 0000000..86ac8f2
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"HTMLCollectionImpl.js","sourceRoot":"","sources":["../../src/dom/HTMLCollectionImpl.ts"],"names":[],"mappings":";;AACA,yCAA6D;AAC7D,0CAAwG;AACxG,gCAA+B;AAC/B,uCAAyC;AAEzC;;GAEG;AACH;IASE;;;;;OAKG;IACH,4BAAoB,IAAU,EAAE,MAAuC;QAbvE,UAAK,GAAY,IAAI,CAAA;QAcnB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QAErB,OAAO,IAAI,KAAK,CAAqB,IAAI,EAAE,IAAI,CAAC,CAAA;I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QAAQ;QACrE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;IAkKtC,yBAAC;CAAA,AAzKD,IAyKC;AAzKY,gDAAkB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.d.ts
new file mode 100644
index 0000000..db67f5e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.d.ts
@@ -0,0 +1,22 @@
+import { Node, MutationObserverInit, MutationRecord, MutationCallback, MutationObserver } from "./interfaces";
+/**
+ * Represents an object that can be used to observe mutations to the tree of
+ * nodes.
+ */
+export declare class MutationObserverImpl implements MutationObserver {
+ _callback: MutationCallback;
+ _nodeList: Node[];
+ _recordQueue: MutationRecord[];
+ /**
+ * Initializes a new instance of `MutationObserver`.
+ *
+ * @param callback - the callback function
+ */
+ constructor(callback: MutationCallback);
+ /** @inheritdoc */
+ observe(target: Node, options?: MutationObserverInit): void;
+ /** @inheritdoc */
+ disconnect(): void;
+ /** @inheritdoc */
+ takeRecords(): MutationRecord[];
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js b/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js
new file mode 100644
index 0000000..c860590
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js
@@ -0,0 +1,184 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("./DOMImpl");
+var util_1 = require("../util");
+var infra_1 = require("@oozcitak/infra");
+/**
+ * Represents an object that can be used to observe mutations to the tree of
+ * nodes.
+ */
+var MutationObserverImpl = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `MutationObserver`.
+ *
+ * @param callback - the callback function
+ */
+ function MutationObserverImpl(callback) {
+ this._nodeList = [];
+ this._recordQueue = [];
+ /**
+ * 1. Let mo be a new MutationObserver object whose callback is callback.
+ * 2. Append mo to mo’s relevant agent’s mutation observers.
+ * 3. Return mo.
+ */
+ this._callback = callback;
+ var window = DOMImpl_1.dom.window;
+ infra_1.set.append(window._mutationObservers, this);
+ }
+ /** @inheritdoc */
+ MutationObserverImpl.prototype.observe = function (target, options) {
+ var e_1, _a;
+ options = options || {
+ childList: false,
+ subtree: false
+ };
+ /**
+ * 1. If either options’s attributeOldValue or attributeFilter is present
+ * and options’s attributes is omitted, then set options’s attributes
+ * to true.
+ * 2. If options’s characterDataOldValue is present and options’s
+ * characterData is omitted, then set options’s characterData to true.
+ * 3. If none of options’s childList, attributes, and characterData is
+ * true, then throw a TypeError.
+ * 4. If options’s attributeOldValue is true and options’s attributes is
+ * false, then throw a TypeError.
+ * 5. If options’s attributeFilter is present and options’s attributes is
+ * false, then throw a TypeError.
+ * 6. If options’s characterDataOldValue is true and options’s characterData
+ * is false, then throw a TypeError.
+ */
+ if ((options.attributeOldValue !== undefined || options.attributeFilter !== undefined) &&
+ options.attributes === undefined) {
+ options.attributes = true;
+ }
+ if (options.characterDataOldValue !== undefined && options.characterData === undefined) {
+ options.characterData = true;
+ }
+ if (!options.childList && !options.attributes && !options.characterData) {
+ throw new TypeError();
+ }
+ if (options.attributeOldValue && !options.attributes) {
+ throw new TypeError();
+ }
+ if (options.attributeFilter !== undefined && !options.attributes) {
+ throw new TypeError();
+ }
+ if (options.characterDataOldValue && !options.characterData) {
+ throw new TypeError();
+ }
+ /**
+ * 7. For each registered of target’s registered observer list, if
+ * registered’s observer is the context object:
+ */
+ var isRegistered = false;
+ var coptions = options;
+ var _loop_1 = function (registered) {
+ var e_2, _a;
+ if (registered.observer === this_1) {
+ isRegistered = true;
+ try {
+ /**
+ * 7.1. For each node of the context object’s node list, remove all
+ * transient registered observers whose source is registered from node’s
+ * registered observer list.
+ */
+ for (var _b = (e_2 = void 0, __values(this_1._nodeList)), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var node = _c.value;
+ infra_1.list.remove(node._registeredObserverList, function (ob) {
+ return util_1.Guard.isTransientRegisteredObserver(ob) && ob.source === registered;
+ });
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ /**
+ * 7.2. Set registered’s options to options.
+ */
+ registered.options = coptions;
+ }
+ };
+ var this_1 = this;
+ try {
+ for (var _b = __values(target._registeredObserverList), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var registered = _c.value;
+ _loop_1(registered);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ /**
+ * 8. Otherwise:
+ * 8.1. Append a new registered observer whose observer is the context
+ * object and options is options to target’s registered observer list.
+ * 8.2. Append target to the context object’s node list.
+ */
+ if (!isRegistered) {
+ target._registeredObserverList.push({ observer: this, options: options });
+ this._nodeList.push(target);
+ }
+ };
+ /** @inheritdoc */
+ MutationObserverImpl.prototype.disconnect = function () {
+ var e_3, _a;
+ var _this = this;
+ try {
+ /**
+ * 1. For each node of the context object’s node list, remove any
+ * registered observer from node’s registered observer list for which the
+ * context object is the observer.
+ */
+ for (var _b = __values(this._nodeList), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var node = _c.value;
+ infra_1.list.remove((node)._registeredObserverList, function (ob) {
+ return ob.observer === _this;
+ });
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ /**
+ * 2. Empty the context object’s record queue.
+ */
+ this._recordQueue = [];
+ };
+ /** @inheritdoc */
+ MutationObserverImpl.prototype.takeRecords = function () {
+ /**
+ * 1. Let records be a clone of the context object’s record queue.
+ * 2. Empty the context object’s record queue.
+ * 3. Return records.
+ */
+ var records = this._recordQueue;
+ this._recordQueue = [];
+ return records;
+ };
+ return MutationObserverImpl;
+}());
+exports.MutationObserverImpl = MutationObserverImpl;
+//# sourceMappingURL=MutationObserverImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js.map
new file mode 100644
index 0000000..4180a0e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"MutationObserverImpl.js","sourceRoot":"","sources":["../../src/dom/MutationObserverImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAA+B;AAI/B,gCAA+B;AAC/B,yCAAoE;AAEpE;;;GAGG;AACH;IAME;;;;OAIG;IACH,8BAAmB,QAA0B;QAR7C,cAAS,GAAW,EAAE,CAAA;QACtB,iBAAY,GAAqB,EAAE,CAAA;QAQjC;;;;WAIG;QACH,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;QACzB,IAAM,MAAM,GAAG,aAAG,CAAC,MAAM,CAAA;QACzB,WAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAA;IAClD,CAAC;IAED,kBAAkB;IAClB,sCAAO,GAAP,UAAQ,MAAY,EAAE,OAA8B;;QAClD,OAAO,GAAG,OAAO,IAAI;YACnB,SAAS,EAAE,KAAK;YAChB,OAAO,EAAE,KAAK;SACf,CAAA;QAED;;;;;;;;;;;;;;WAcG;QACH,IAAI,CAAC,OAAO,CAAC,iBAAiB,K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AA;qBACF;;;;;;;;;gBACD;;mBAEG;gBACH,UAAU,CAAC,OAAO,GAAG,QAAQ,CAAA;aAC9B;;;;YAjBH,KAAyB,IAAA,KAAA,SAAA,MAAM,CAAC,uBAAuB,CAAA,gBAAA;gBAAlD,IAAM,UAAU,WAAA;wBAAV,UAAU;aAkBpB;;;;;;;;;QAED;;;;;WAKG;QACH,IAAI,CAAC,YAAY,EAAE;YACjB,MAAM,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAA;YACzE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;SAC5B;IACH,CAAC;IAED,kBAAkB;IAClB,yCAAU,GAAV;;QAAA,iBAgBC;;YAfC;;;;eAIG;YACH,KAAmB,IAAA,KAAA,SAAA,IAAI,CAAC,SAAS,CAAA,gBAAA,4BAAE;gBAA9B,IAAM,IAAI,WAAA;gBACb,YAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,uBAAuB,EAAE,UAAC,EAAE;oBAClD,OAAA,EAAE,CAAC,QAAQ,KAAK,KAAI;gBAApB,CAAoB,CACrB,CAAA;aACF;;;;;;;;;QAED;;WAEG;QACH,IAAI,CAAC,YAAY,GAAG,EAAE,CAAA;IACxB,CAAC;IAED,kBAAkB;IAClB,0CAAW,GAAX;QACE;;;;WAIG;QACH,IAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAA;QACjC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAA;QACtB,OAAO,OAAO,CAAA;IAChB,CAAC;IAEH,2BAAC;AAAD,CAAC,AArID,IAqIC;AArIY,oDAAoB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.d.ts
new file mode 100644
index 0000000..24b3368
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.d.ts
@@ -0,0 +1,73 @@
+import { Node, NodeList, MutationRecord } from "./interfaces";
+/**
+ * Represents a mutation record.
+ */
+export declare class MutationRecordImpl implements MutationRecord {
+ private _type;
+ private _target;
+ private _addedNodes;
+ private _removedNodes;
+ private _previousSibling;
+ private _nextSibling;
+ private _attributeName;
+ private _attributeNamespace;
+ private _oldValue;
+ /**
+ * Initializes a new instance of `MutationRecord`.
+ *
+ * @param type - type of mutation: `"attributes"` for an attribute
+ * mutation, `"characterData"` for a mutation to a CharacterData node
+ * and `"childList"` for a mutation to the tree of nodes.
+ * @param target - node affected by the mutation.
+ * @param addedNodes - list of added nodes.
+ * @param removedNodes - list of removed nodes.
+ * @param previousSibling - previous sibling of added or removed nodes.
+ * @param nextSibling - next sibling of added or removed nodes.
+ * @param attributeName - local name of the changed attribute,
+ * and `null` otherwise.
+ * @param attributeNamespace - namespace of the changed attribute,
+ * and `null` otherwise.
+ * @param oldValue - value before mutation: attribute value for an attribute
+ * mutation, node `data` for a mutation to a CharacterData node and `null`
+ * for a mutation to the tree of nodes.
+ */
+ private constructor();
+ /** @inheritdoc */
+ get type(): "attributes" | "characterData" | "childList";
+ /** @inheritdoc */
+ get target(): Node;
+ /** @inheritdoc */
+ get addedNodes(): NodeList;
+ /** @inheritdoc */
+ get removedNodes(): NodeList;
+ /** @inheritdoc */
+ get previousSibling(): Node | null;
+ /** @inheritdoc */
+ get nextSibling(): Node | null;
+ /** @inheritdoc */
+ get attributeName(): string | null;
+ /** @inheritdoc */
+ get attributeNamespace(): string | null;
+ /** @inheritdoc */
+ get oldValue(): string | null;
+ /**
+ * Creates a new `MutationRecord`.
+ *
+ * @param type - type of mutation: `"attributes"` for an attribute
+ * mutation, `"characterData"` for a mutation to a CharacterData node
+ * and `"childList"` for a mutation to the tree of nodes.
+ * @param target - node affected by the mutation.
+ * @param addedNodes - list of added nodes.
+ * @param removedNodes - list of removed nodes.
+ * @param previousSibling - previous sibling of added or removed nodes.
+ * @param nextSibling - next sibling of added or removed nodes.
+ * @param attributeName - local name of the changed attribute,
+ * and `null` otherwise.
+ * @param attributeNamespace - namespace of the changed attribute,
+ * and `null` otherwise.
+ * @param oldValue - value before mutation: attribute value for an attribute
+ * mutation, node `data` for a mutation to a CharacterData node and `null`
+ * for a mutation to the tree of nodes.
+ */
+ static _create(type: "attributes" | "characterData" | "childList", target: Node, addedNodes: NodeList, removedNodes: NodeList, previousSibling: Node | null, nextSibling: Node | null, attributeName: string | null, attributeNamespace: string | null, oldValue: string | null): MutationRecordImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js b/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js
new file mode 100644
index 0000000..b17e1b0
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js
@@ -0,0 +1,116 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Represents a mutation record.
+ */
+var MutationRecordImpl = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `MutationRecord`.
+ *
+ * @param type - type of mutation: `"attributes"` for an attribute
+ * mutation, `"characterData"` for a mutation to a CharacterData node
+ * and `"childList"` for a mutation to the tree of nodes.
+ * @param target - node affected by the mutation.
+ * @param addedNodes - list of added nodes.
+ * @param removedNodes - list of removed nodes.
+ * @param previousSibling - previous sibling of added or removed nodes.
+ * @param nextSibling - next sibling of added or removed nodes.
+ * @param attributeName - local name of the changed attribute,
+ * and `null` otherwise.
+ * @param attributeNamespace - namespace of the changed attribute,
+ * and `null` otherwise.
+ * @param oldValue - value before mutation: attribute value for an attribute
+ * mutation, node `data` for a mutation to a CharacterData node and `null`
+ * for a mutation to the tree of nodes.
+ */
+ function MutationRecordImpl(type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue) {
+ this._type = type;
+ this._target = target;
+ this._addedNodes = addedNodes;
+ this._removedNodes = removedNodes;
+ this._previousSibling = previousSibling;
+ this._nextSibling = nextSibling;
+ this._attributeName = attributeName;
+ this._attributeNamespace = attributeNamespace;
+ this._oldValue = oldValue;
+ }
+ Object.defineProperty(MutationRecordImpl.prototype, "type", {
+ /** @inheritdoc */
+ get: function () { return this._type; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(MutationRecordImpl.prototype, "target", {
+ /** @inheritdoc */
+ get: function () { return this._target; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(MutationRecordImpl.prototype, "addedNodes", {
+ /** @inheritdoc */
+ get: function () { return this._addedNodes; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(MutationRecordImpl.prototype, "removedNodes", {
+ /** @inheritdoc */
+ get: function () { return this._removedNodes; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(MutationRecordImpl.prototype, "previousSibling", {
+ /** @inheritdoc */
+ get: function () { return this._previousSibling; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(MutationRecordImpl.prototype, "nextSibling", {
+ /** @inheritdoc */
+ get: function () { return this._nextSibling; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(MutationRecordImpl.prototype, "attributeName", {
+ /** @inheritdoc */
+ get: function () { return this._attributeName; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(MutationRecordImpl.prototype, "attributeNamespace", {
+ /** @inheritdoc */
+ get: function () { return this._attributeNamespace; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(MutationRecordImpl.prototype, "oldValue", {
+ /** @inheritdoc */
+ get: function () { return this._oldValue; },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Creates a new `MutationRecord`.
+ *
+ * @param type - type of mutation: `"attributes"` for an attribute
+ * mutation, `"characterData"` for a mutation to a CharacterData node
+ * and `"childList"` for a mutation to the tree of nodes.
+ * @param target - node affected by the mutation.
+ * @param addedNodes - list of added nodes.
+ * @param removedNodes - list of removed nodes.
+ * @param previousSibling - previous sibling of added or removed nodes.
+ * @param nextSibling - next sibling of added or removed nodes.
+ * @param attributeName - local name of the changed attribute,
+ * and `null` otherwise.
+ * @param attributeNamespace - namespace of the changed attribute,
+ * and `null` otherwise.
+ * @param oldValue - value before mutation: attribute value for an attribute
+ * mutation, node `data` for a mutation to a CharacterData node and `null`
+ * for a mutation to the tree of nodes.
+ */
+ MutationRecordImpl._create = function (type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue) {
+ return new MutationRecordImpl(type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue);
+ };
+ return MutationRecordImpl;
+}());
+exports.MutationRecordImpl = MutationRecordImpl;
+//# sourceMappingURL=MutationRecordImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js.map
new file mode 100644
index 0000000..5e03d26
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"MutationRecordImpl.js","sourceRoot":"","sources":["../../src/dom/MutationRecordImpl.ts"],"names":[],"mappings":";;AAEA;;GAEG;AACH;IAYE;;;;;;;;;;;;;;;;;;OAkBG;IACH,4BAAoB,IAAkD,EACpE,MAAY,EAAE,UAAoB,EAClC,YAAsB,EAAE,eAA4B,EACpD,WAAwB,EAAE,aAA4B,EACtD,kBAAiC,EAAE,QAAuB;QAE1D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QACrB,IAAI,CAAC,WAAW,GAAG,UAAU,CAAA;QAC7B,IAAI,CAAC,aAAa,GAAG,YAAY,CAAA;QACjC,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAA;QACvC,IAAI,CAAC,YAAY,GAAG,WAAW,CAAA;QAC/B,IAAI,CAAC,cAAc,GAAG,aAAa,CAAA;QACnC,IAAI,CAAC,mBAAmB,GAA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Ae,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,EAC/D,QAAQ,CAAC,CAAA;IACb,CAAC;IACH,yBAAC;AAAD,CAAC,AAxGD,IAwGC;AAxGY,gDAAkB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.d.ts
new file mode 100644
index 0000000..3b42f5f
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.d.ts
@@ -0,0 +1,34 @@
+import { Element, Attr, NamedNodeMap } from "./interfaces";
+/**
+ * Represents a collection of attributes.
+ */
+export declare class NamedNodeMapImpl extends Array implements NamedNodeMap {
+ _element: Element;
+ /**
+ * Initializes a new instance of `NamedNodeMap`.
+ *
+ * @param element - parent element
+ */
+ private constructor();
+ _asArray(): Array;
+ /** @inheritdoc */
+ item(index: number): Attr | null;
+ /** @inheritdoc */
+ getNamedItem(qualifiedName: string): Attr | null;
+ /** @inheritdoc */
+ getNamedItemNS(namespace: string | null, localName: string): Attr | null;
+ /** @inheritdoc */
+ setNamedItem(attr: Attr): Attr | null;
+ /** @inheritdoc */
+ setNamedItemNS(attr: Attr): Attr | null;
+ /** @inheritdoc */
+ removeNamedItem(qualifiedName: string): Attr;
+ /** @inheritdoc */
+ removeNamedItemNS(namespace: string | null, localName: string): Attr;
+ /**
+ * Creates a new `NamedNodeMap`.
+ *
+ * @param element - parent element
+ */
+ static _create(element: Element): NamedNodeMapImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js b/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js
new file mode 100644
index 0000000..29b266f
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js
@@ -0,0 +1,112 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMException_1 = require("./DOMException");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents a collection of attributes.
+ */
+var NamedNodeMapImpl = /** @class */ (function (_super) {
+ __extends(NamedNodeMapImpl, _super);
+ /**
+ * Initializes a new instance of `NamedNodeMap`.
+ *
+ * @param element - parent element
+ */
+ function NamedNodeMapImpl(element) {
+ var _this = _super.call(this) || this;
+ _this._element = element;
+ // TODO: This workaround is needed to extend Array in ES5
+ Object.setPrototypeOf(_this, NamedNodeMapImpl.prototype);
+ return _this;
+ }
+ NamedNodeMapImpl.prototype._asArray = function () { return this; };
+ /** @inheritdoc */
+ NamedNodeMapImpl.prototype.item = function (index) {
+ /**
+ * 1. If index is equal to or greater than context object’s attribute list’s
+ * size, then return null.
+ * 2. Otherwise, return context object’s attribute list[index].
+ *
+ */
+ return this[index] || null;
+ };
+ /** @inheritdoc */
+ NamedNodeMapImpl.prototype.getNamedItem = function (qualifiedName) {
+ /**
+ * The getNamedItem(qualifiedName) method, when invoked, must return the
+ * result of getting an attribute given qualifiedName and element.
+ */
+ return algorithm_1.element_getAnAttributeByName(qualifiedName, this._element);
+ };
+ /** @inheritdoc */
+ NamedNodeMapImpl.prototype.getNamedItemNS = function (namespace, localName) {
+ /**
+ * The getNamedItemNS(namespace, localName) method, when invoked, must
+ * return the result of getting an attribute given namespace, localName,
+ * and element.
+ */
+ return algorithm_1.element_getAnAttributeByNamespaceAndLocalName(namespace || '', localName, this._element);
+ };
+ /** @inheritdoc */
+ NamedNodeMapImpl.prototype.setNamedItem = function (attr) {
+ /**
+ * The setNamedItem(attr) and setNamedItemNS(attr) methods, when invoked,
+ * must return the result of setting an attribute given attr and element.
+ */
+ return algorithm_1.element_setAnAttribute(attr, this._element);
+ };
+ /** @inheritdoc */
+ NamedNodeMapImpl.prototype.setNamedItemNS = function (attr) {
+ return algorithm_1.element_setAnAttribute(attr, this._element);
+ };
+ /** @inheritdoc */
+ NamedNodeMapImpl.prototype.removeNamedItem = function (qualifiedName) {
+ /**
+ * 1. Let attr be the result of removing an attribute given qualifiedName
+ * and element.
+ * 2. If attr is null, then throw a "NotFoundError" DOMException.
+ * 3. Return attr.
+ */
+ var attr = algorithm_1.element_removeAnAttributeByName(qualifiedName, this._element);
+ if (attr === null)
+ throw new DOMException_1.NotFoundError();
+ return attr;
+ };
+ /** @inheritdoc */
+ NamedNodeMapImpl.prototype.removeNamedItemNS = function (namespace, localName) {
+ /**
+ * 1. Let attr be the result of removing an attribute given namespace,
+ * localName, and element.
+ * 2. If attr is null, then throw a "NotFoundError" DOMException.
+ * 3. Return attr.
+ */
+ var attr = algorithm_1.element_removeAnAttributeByNamespaceAndLocalName(namespace || '', localName, this._element);
+ if (attr === null)
+ throw new DOMException_1.NotFoundError();
+ return attr;
+ };
+ /**
+ * Creates a new `NamedNodeMap`.
+ *
+ * @param element - parent element
+ */
+ NamedNodeMapImpl._create = function (element) {
+ return new NamedNodeMapImpl(element);
+ };
+ return NamedNodeMapImpl;
+}(Array));
+exports.NamedNodeMapImpl = NamedNodeMapImpl;
+//# sourceMappingURL=NamedNodeMapImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js.map
new file mode 100644
index 0000000..8abf2b3
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"NamedNodeMapImpl.js","sourceRoot":"","sources":["../../src/dom/NamedNodeMapImpl.ts"],"names":[],"mappings":";;;;;;;;;;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MAAM,IAAI,4BAAa,EAAE,CAAA;QAE3B,OAAO,IAAI,CAAA;IACb,CAAC;IAED,kBAAkB;IAClB,4CAAiB,GAAjB,UAAkB,SAAwB,EAAE,SAAiB;QAC3D;;;;;WAKG;QACH,IAAM,IAAI,GAAG,4DAAgD,CAC3D,SAAS,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;QAE5C,IAAI,IAAI,KAAK,IAAI;YACf,MAAM,IAAI,4BAAa,EAAE,CAAA;QAE3B,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;OAIG;IACI,wBAAO,GAAd,UAAe,OAAgB;QAC7B,OAAO,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACtC,CAAC;IACH,uBAAC;AAAD,CAAC,AAxGD,CAAsC,KAAK,GAwG1C;AAxGY,4CAAgB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.d.ts
new file mode 100644
index 0000000..7f5cac4
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.d.ts
@@ -0,0 +1,50 @@
+import { Node, FilterResult, NodeFilter } from "./interfaces";
+/**
+ * Represents a node filter.
+ */
+export declare class NodeFilterImpl implements NodeFilter {
+ static FILTER_ACCEPT: number;
+ static FILTER_REJECT: number;
+ static FILTER_SKIP: number;
+ static SHOW_ALL: number;
+ static SHOW_ELEMENT: number;
+ static SHOW_ATTRIBUTE: number;
+ static SHOW_TEXT: number;
+ static SHOW_CDATA_SECTION: number;
+ static SHOW_ENTITY_REFERENCE: number;
+ static SHOW_ENTITY: number;
+ static SHOW_PROCESSING_INSTRUCTION: number;
+ static SHOW_COMMENT: number;
+ static SHOW_DOCUMENT: number;
+ static SHOW_DOCUMENT_TYPE: number;
+ static SHOW_DOCUMENT_FRAGMENT: number;
+ static SHOW_NOTATION: number;
+ FILTER_ACCEPT: number;
+ FILTER_REJECT: number;
+ FILTER_SKIP: number;
+ SHOW_ALL: number;
+ SHOW_ELEMENT: number;
+ SHOW_ATTRIBUTE: number;
+ SHOW_TEXT: number;
+ SHOW_CDATA_SECTION: number;
+ SHOW_ENTITY_REFERENCE: number;
+ SHOW_ENTITY: number;
+ SHOW_PROCESSING_INSTRUCTION: number;
+ SHOW_COMMENT: number;
+ SHOW_DOCUMENT: number;
+ SHOW_DOCUMENT_TYPE: number;
+ SHOW_DOCUMENT_FRAGMENT: number;
+ SHOW_NOTATION: number;
+ /**
+ * Initializes a new instance of `NodeFilter`.
+ */
+ private constructor();
+ /**
+ * Callback function.
+ */
+ acceptNode(node: Node): FilterResult;
+ /**
+ * Creates a new `NodeFilter`.
+ */
+ static _create(): NodeFilter;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js b/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js
new file mode 100644
index 0000000..884c425
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js
@@ -0,0 +1,64 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("./interfaces");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+/**
+ * Represents a node filter.
+ */
+var NodeFilterImpl = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `NodeFilter`.
+ */
+ function NodeFilterImpl() {
+ }
+ /**
+ * Callback function.
+ */
+ NodeFilterImpl.prototype.acceptNode = function (node) {
+ return interfaces_1.FilterResult.Accept;
+ };
+ /**
+ * Creates a new `NodeFilter`.
+ */
+ NodeFilterImpl._create = function () {
+ return new NodeFilterImpl();
+ };
+ NodeFilterImpl.FILTER_ACCEPT = 1;
+ NodeFilterImpl.FILTER_REJECT = 2;
+ NodeFilterImpl.FILTER_SKIP = 3;
+ NodeFilterImpl.SHOW_ALL = 0xffffffff;
+ NodeFilterImpl.SHOW_ELEMENT = 0x1;
+ NodeFilterImpl.SHOW_ATTRIBUTE = 0x2;
+ NodeFilterImpl.SHOW_TEXT = 0x4;
+ NodeFilterImpl.SHOW_CDATA_SECTION = 0x8;
+ NodeFilterImpl.SHOW_ENTITY_REFERENCE = 0x10;
+ NodeFilterImpl.SHOW_ENTITY = 0x20;
+ NodeFilterImpl.SHOW_PROCESSING_INSTRUCTION = 0x40;
+ NodeFilterImpl.SHOW_COMMENT = 0x80;
+ NodeFilterImpl.SHOW_DOCUMENT = 0x100;
+ NodeFilterImpl.SHOW_DOCUMENT_TYPE = 0x200;
+ NodeFilterImpl.SHOW_DOCUMENT_FRAGMENT = 0x400;
+ NodeFilterImpl.SHOW_NOTATION = 0x800;
+ return NodeFilterImpl;
+}());
+exports.NodeFilterImpl = NodeFilterImpl;
+/**
+ * Define constants on prototype.
+ */
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "FILTER_ACCEPT", 1);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "FILTER_REJECT", 2);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "FILTER_SKIP", 3);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ALL", 0xffffffff);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ELEMENT", 0x1);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ATTRIBUTE", 0x2);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_TEXT", 0x4);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_CDATA_SECTION", 0x8);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ENTITY_REFERENCE", 0x10);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ENTITY", 0x20);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_PROCESSING_INSTRUCTION", 0x40);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_COMMENT", 0x80);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_DOCUMENT", 0x100);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_DOCUMENT_TYPE", 0x200);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_DOCUMENT_FRAGMENT", 0x400);
+WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_NOTATION", 0x800);
+//# sourceMappingURL=NodeFilterImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js.map
new file mode 100644
index 0000000..0292873
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"NodeFilterImpl.js","sourceRoot":"","sources":["../../src/dom/NodeFilterImpl.ts"],"names":[],"mappings":";;AAAA,2CAA6D;AAC7D,gEAA8D;AAE9D;;GAEG;AACH;IAsCE;;OAEG;IACH;IAEA,CAAC;IAED;;OAEG;IACH,mCAAU,GAAV,UAAW,IAAU;QACnB,OAAO,yBAAY,CAAC,MAAM,CAAA;IAC5B,CAAC;IAED;;OAEG;IACI,sBAAO,GAAd;QACE,OAAO,IAAI,cAAc,EAAE,CAAA;IAC7B,CAAC;IAvDM,4BAAa,GAAG,CAAC,CAAA;IACjB,4BAAa,GAAG,CAAC,CAAA;IACjB,0BAAW,GAAG,CAAC,CAAA;IAEf,uBAAQ,GAAG,UAAU,CAAA;IACrB,2BAAY,GAAG,GAAG,CAAA;IAClB,6BAAc,GAAG,GAAG,CAAA;IACpB,wBAAS,GAAG,GAAG,CAAA;IACf,iCAAkB,GAAG,GAAG,CAAA;IACxB,oCAAqB,GAAG,IAAI,CAAA;IAC5B,0B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AAE,KAAK,CAAC,CAAA;AACjE,iCAAe,CAAC,cAAc,CAAC,SAAS,EAAE,oBAAoB,EAAE,KAAK,CAAC,CAAA;AACtE,iCAAe,CAAC,cAAc,CAAC,SAAS,EAAE,wBAAwB,EAAE,KAAK,CAAC,CAAA;AAC1E,iCAAe,CAAC,cAAc,CAAC,SAAS,EAAE,eAAe,EAAE,KAAK,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NodeImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/NodeImpl.d.ts
new file mode 100644
index 0000000..f451436
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeImpl.d.ts
@@ -0,0 +1,252 @@
+import { Node, NodeList, Element, Document, NodeType, Position, GetRootNodeOptions, RegisteredObserver, TransientRegisteredObserver, Event, EventTarget } from "./interfaces";
+import { EventTargetImpl } from "./EventTargetImpl";
+/**
+ * Represents a generic XML node.
+ */
+export declare abstract class NodeImpl extends EventTargetImpl implements Node {
+ static ELEMENT_NODE: number;
+ static ATTRIBUTE_NODE: number;
+ static TEXT_NODE: number;
+ static CDATA_SECTION_NODE: number;
+ static ENTITY_REFERENCE_NODE: number;
+ static ENTITY_NODE: number;
+ static PROCESSING_INSTRUCTION_NODE: number;
+ static COMMENT_NODE: number;
+ static DOCUMENT_NODE: number;
+ static DOCUMENT_TYPE_NODE: number;
+ static DOCUMENT_FRAGMENT_NODE: number;
+ static NOTATION_NODE: number;
+ static DOCUMENT_POSITION_DISCONNECTED: number;
+ static DOCUMENT_POSITION_PRECEDING: number;
+ static DOCUMENT_POSITION_FOLLOWING: number;
+ static DOCUMENT_POSITION_CONTAINS: number;
+ static DOCUMENT_POSITION_CONTAINED_BY: number;
+ static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ ELEMENT_NODE: number;
+ ATTRIBUTE_NODE: number;
+ TEXT_NODE: number;
+ CDATA_SECTION_NODE: number;
+ ENTITY_REFERENCE_NODE: number;
+ ENTITY_NODE: number;
+ PROCESSING_INSTRUCTION_NODE: number;
+ COMMENT_NODE: number;
+ DOCUMENT_NODE: number;
+ DOCUMENT_TYPE_NODE: number;
+ DOCUMENT_FRAGMENT_NODE: number;
+ NOTATION_NODE: number;
+ DOCUMENT_POSITION_DISCONNECTED: number;
+ DOCUMENT_POSITION_PRECEDING: number;
+ DOCUMENT_POSITION_FOLLOWING: number;
+ DOCUMENT_POSITION_CONTAINS: number;
+ DOCUMENT_POSITION_CONTAINED_BY: number;
+ DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ private __childNodes?;
+ get _childNodes(): NodeList;
+ private _nodeDocumentOverride?;
+ get _nodeDocument(): Document;
+ set _nodeDocument(val: Document);
+ private __registeredObserverList?;
+ get _registeredObserverList(): (RegisteredObserver | TransientRegisteredObserver)[];
+ abstract _nodeType: NodeType;
+ _parent: Node | null;
+ _children: Set;
+ _firstChild: Node | null;
+ _lastChild: Node | null;
+ _previousSibling: Node | null;
+ _nextSibling: Node | null;
+ /**
+ * Initializes a new instance of `Node`.
+ */
+ protected constructor();
+ /** @inheritdoc */
+ get nodeType(): NodeType;
+ /**
+ * Returns a string appropriate for the type of node.
+ */
+ get nodeName(): string;
+ /**
+ * Gets the absolute base URL of the node.
+ */
+ get baseURI(): string;
+ /**
+ * Returns whether the node is rooted to a document node.
+ */
+ get isConnected(): boolean;
+ /**
+ * Returns the parent document.
+ */
+ get ownerDocument(): Document | null;
+ /**
+ * Returns the root node.
+ *
+ * @param options - if options has `composed = true` this function
+ * returns the node's shadow-including root, otherwise it returns
+ * the node's root node.
+ */
+ getRootNode(options?: GetRootNodeOptions): Node;
+ /**
+ * Returns the parent node.
+ */
+ get parentNode(): Node | null;
+ /**
+ * Returns the parent element.
+ */
+ get parentElement(): Element | null;
+ /**
+ * Determines whether a node has any children.
+ */
+ hasChildNodes(): boolean;
+ /**
+ * Returns a {@link NodeList} of child nodes.
+ */
+ get childNodes(): NodeList;
+ /**
+ * Returns the first child node.
+ */
+ get firstChild(): Node | null;
+ /**
+ * Returns the last child node.
+ */
+ get lastChild(): Node | null;
+ /**
+ * Returns the previous sibling node.
+ */
+ get previousSibling(): Node | null;
+ /**
+ * Returns the next sibling node.
+ */
+ get nextSibling(): Node | null;
+ /**
+ * Gets or sets the data associated with a {@link CharacterData} node or the
+ * value of an {@link @Attr} node. For other node types returns `null`.
+ */
+ get nodeValue(): string | null;
+ set nodeValue(value: string | null);
+ /**
+ * Returns the concatenation of data of all the {@link Text}
+ * node descendants in tree order. When set, replaces the text
+ * contents of the node with the given value.
+ */
+ get textContent(): string | null;
+ set textContent(value: string | null);
+ /**
+ * Puts all {@link Text} nodes in the full depth of the sub-tree
+ * underneath this node into a "normal" form where only markup
+ * (e.g., tags, comments, processing instructions, CDATA sections,
+ * and entity references) separates {@link Text} nodes, i.e., there
+ * are no adjacent Text nodes.
+ */
+ normalize(): void;
+ /**
+ * Returns a duplicate of this node, i.e., serves as a generic copy
+ * constructor for nodes. The duplicate node has no parent
+ * ({@link parentNode} returns `null`).
+ *
+ * @param deep - if `true`, recursively clone the subtree under the
+ * specified node. If `false`, clone only the node itself (and its
+ * attributes, if it is an {@link Element}).
+ */
+ cloneNode(deep?: boolean): Node;
+ /**
+ * Determines if the given node is equal to this one.
+ *
+ * @param node - the node to compare with
+ */
+ isEqualNode(node?: Node | null): boolean;
+ /**
+ * Determines if the given node is reference equal to this one.
+ *
+ * @param node - the node to compare with
+ */
+ isSameNode(node?: Node | null): boolean;
+ /**
+ * Returns a bitmask indicating the position of the given `node`
+ * relative to this node.
+ */
+ compareDocumentPosition(other: Node): Position;
+ /**
+ * Returns `true` if given node is an inclusive descendant of this
+ * node, and `false` otherwise (including when other node is `null`).
+ *
+ * @param other - the node to check
+ */
+ contains(other: Node | null): boolean;
+ /**
+ * Returns the prefix for a given namespace URI, if present, and
+ * `null` if not.
+ *
+ * @param namespace - the namespace to search
+ */
+ lookupPrefix(namespace: string | null): string | null;
+ /**
+ * Returns the namespace URI for a given prefix if present, and `null`
+ * if not.
+ *
+ * @param prefix - the prefix to search
+ */
+ lookupNamespaceURI(prefix: string | null): string | null;
+ /**
+ * Returns `true` if the namespace is the default namespace on this
+ * node or `false` if not.
+ *
+ * @param namespace - the namespace to check
+ */
+ isDefaultNamespace(namespace: string | null): boolean;
+ /**
+ * Inserts the node `newChild` before the existing child node
+ * `refChild`. If `refChild` is `null`, inserts `newChild` at the end
+ * of the list of children.
+ *
+ * If `newChild` is a {@link DocumentFragment} object, all of its
+ * children are inserted, in the same order, before `refChild`.
+ *
+ * If `newChild` is already in the tree, it is first removed.
+ *
+ * @param newChild - the node to insert
+ * @param refChild - the node before which the new node must be
+ * inserted
+ *
+ * @returns the newly inserted child node
+ */
+ insertBefore(newChild: Node, refChild: Node | null): Node;
+ /**
+ * Adds the node `newChild` to the end of the list of children of this
+ * node, and returns it. If `newChild` is already in the tree, it is
+ * first removed.
+ *
+ * If `newChild` is a {@link DocumentFragment} object, the entire
+ * contents of the document fragment are moved into the child list of
+ * this node.
+ *
+ * @param newChild - the node to add
+ *
+ * @returns the newly inserted child node
+ */
+ appendChild(newChild: Node): Node;
+ /**
+ * Replaces the child node `oldChild` with `newChild` in the list of
+ * children, and returns the `oldChild` node. If `newChild` is already
+ * in the tree, it is first removed.
+ *
+ * @param newChild - the new node to put in the child list
+ * @param oldChild - the node being replaced in the list
+ *
+ * @returns the removed child node
+ */
+ replaceChild(newChild: Node, oldChild: Node): Node;
+ /**
+ * Removes the child node indicated by `oldChild` from the list of
+ * children, and returns it.
+ *
+ * @param oldChild - the node being removed from the list
+ *
+ * @returns the removed child node
+ */
+ removeChild(oldChild: Node): Node;
+ /**
+ * Gets the parent event target for the given event.
+ *
+ * @param event - an event
+ */
+ _getTheParent(event: Event): EventTarget | null;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js b/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js
new file mode 100644
index 0000000..74d19f2
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js
@@ -0,0 +1,891 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("./DOMImpl");
+var interfaces_1 = require("./interfaces");
+var EventTargetImpl_1 = require("./EventTargetImpl");
+var util_1 = require("../util");
+var DOMException_1 = require("./DOMException");
+var algorithm_1 = require("../algorithm");
+var URLAlgorithm_1 = require("@oozcitak/url/lib/URLAlgorithm");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+/**
+ * Represents a generic XML node.
+ */
+var NodeImpl = /** @class */ (function (_super) {
+ __extends(NodeImpl, _super);
+ /**
+ * Initializes a new instance of `Node`.
+ */
+ function NodeImpl() {
+ var _this = _super.call(this) || this;
+ _this._parent = null;
+ _this._firstChild = null;
+ _this._lastChild = null;
+ _this._previousSibling = null;
+ _this._nextSibling = null;
+ return _this;
+ }
+ Object.defineProperty(NodeImpl.prototype, "_childNodes", {
+ get: function () {
+ return this.__childNodes || (this.__childNodes = algorithm_1.create_nodeList(this));
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "_nodeDocument", {
+ get: function () { return this._nodeDocumentOverride || DOMImpl_1.dom.window._associatedDocument; },
+ set: function (val) { this._nodeDocumentOverride = val; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "_registeredObserverList", {
+ get: function () {
+ return this.__registeredObserverList || (this.__registeredObserverList = []);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "nodeType", {
+ /** @inheritdoc */
+ get: function () { return this._nodeType; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "nodeName", {
+ /**
+ * Returns a string appropriate for the type of node.
+ */
+ get: function () {
+ if (util_1.Guard.isElementNode(this)) {
+ return this._htmlUppercasedQualifiedName;
+ }
+ else if (util_1.Guard.isAttrNode(this)) {
+ return this._qualifiedName;
+ }
+ else if (util_1.Guard.isExclusiveTextNode(this)) {
+ return "#text";
+ }
+ else if (util_1.Guard.isCDATASectionNode(this)) {
+ return "#cdata-section";
+ }
+ else if (util_1.Guard.isProcessingInstructionNode(this)) {
+ return this._target;
+ }
+ else if (util_1.Guard.isCommentNode(this)) {
+ return "#comment";
+ }
+ else if (util_1.Guard.isDocumentNode(this)) {
+ return "#document";
+ }
+ else if (util_1.Guard.isDocumentTypeNode(this)) {
+ return this._name;
+ }
+ else if (util_1.Guard.isDocumentFragmentNode(this)) {
+ return "#document-fragment";
+ }
+ else {
+ return "";
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "baseURI", {
+ /**
+ * Gets the absolute base URL of the node.
+ */
+ get: function () {
+ /**
+ * The baseURI attribute’s getter must return node document’s document
+ * base URL, serialized.
+ * TODO: Implement in HTML DOM
+ * https://html.spec.whatwg.org/multipage/urls-and-fetching.html#document-base-url
+ */
+ return URLAlgorithm_1.urlSerializer(this._nodeDocument._URL);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "isConnected", {
+ /**
+ * Returns whether the node is rooted to a document node.
+ */
+ get: function () {
+ /**
+ * The isConnected attribute’s getter must return true, if context object
+ * is connected, and false otherwise.
+ */
+ return util_1.Guard.isElementNode(this) && algorithm_1.shadowTree_isConnected(this);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "ownerDocument", {
+ /**
+ * Returns the parent document.
+ */
+ get: function () {
+ /**
+ * The ownerDocument attribute’s getter must return null, if the context
+ * object is a document, and the context object’s node document otherwise.
+ * _Note:_ The node document of a document is that document itself. All
+ * nodes have a node document at all times.
+ */
+ if (this._nodeType === interfaces_1.NodeType.Document)
+ return null;
+ else
+ return this._nodeDocument;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Returns the root node.
+ *
+ * @param options - if options has `composed = true` this function
+ * returns the node's shadow-including root, otherwise it returns
+ * the node's root node.
+ */
+ NodeImpl.prototype.getRootNode = function (options) {
+ /**
+ * The getRootNode(options) method, when invoked, must return context
+ * object’s shadow-including root if options’s composed is true,
+ * and context object’s root otherwise.
+ */
+ return algorithm_1.tree_rootNode(this, !!options && options.composed);
+ };
+ Object.defineProperty(NodeImpl.prototype, "parentNode", {
+ /**
+ * Returns the parent node.
+ */
+ get: function () {
+ /**
+ * The parentNode attribute’s getter must return the context object’s parent.
+ * _Note:_ An Attr node has no parent.
+ */
+ if (this._nodeType === interfaces_1.NodeType.Attribute) {
+ return null;
+ }
+ else {
+ return this._parent;
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "parentElement", {
+ /**
+ * Returns the parent element.
+ */
+ get: function () {
+ /**
+ * The parentElement attribute’s getter must return the context object’s
+ * parent element.
+ */
+ if (this._parent && util_1.Guard.isElementNode(this._parent)) {
+ return this._parent;
+ }
+ else {
+ return null;
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Determines whether a node has any children.
+ */
+ NodeImpl.prototype.hasChildNodes = function () {
+ /**
+ * The hasChildNodes() method, when invoked, must return true if the context
+ * object has children, and false otherwise.
+ */
+ return (this._firstChild !== null);
+ };
+ Object.defineProperty(NodeImpl.prototype, "childNodes", {
+ /**
+ * Returns a {@link NodeList} of child nodes.
+ */
+ get: function () {
+ /**
+ * The childNodes attribute’s getter must return a NodeList rooted at the
+ * context object matching only children.
+ */
+ return this._childNodes;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "firstChild", {
+ /**
+ * Returns the first child node.
+ */
+ get: function () {
+ /**
+ * The firstChild attribute’s getter must return the context object’s first
+ * child.
+ */
+ return this._firstChild;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "lastChild", {
+ /**
+ * Returns the last child node.
+ */
+ get: function () {
+ /**
+ * The lastChild attribute’s getter must return the context object’s last
+ * child.
+ */
+ return this._lastChild;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "previousSibling", {
+ /**
+ * Returns the previous sibling node.
+ */
+ get: function () {
+ /**
+ * The previousSibling attribute’s getter must return the context object’s
+ * previous sibling.
+ * _Note:_ An Attr node has no siblings.
+ */
+ return this._previousSibling;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "nextSibling", {
+ /**
+ * Returns the next sibling node.
+ */
+ get: function () {
+ /**
+ * The nextSibling attribute’s getter must return the context object’s
+ * next sibling.
+ */
+ return this._nextSibling;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "nodeValue", {
+ /**
+ * Gets or sets the data associated with a {@link CharacterData} node or the
+ * value of an {@link @Attr} node. For other node types returns `null`.
+ */
+ get: function () {
+ if (util_1.Guard.isAttrNode(this)) {
+ return this._value;
+ }
+ else if (util_1.Guard.isCharacterDataNode(this)) {
+ return this._data;
+ }
+ else {
+ return null;
+ }
+ },
+ set: function (value) {
+ if (value === null) {
+ value = '';
+ }
+ if (util_1.Guard.isAttrNode(this)) {
+ algorithm_1.attr_setAnExistingAttributeValue(this, value);
+ }
+ else if (util_1.Guard.isCharacterDataNode(this)) {
+ algorithm_1.characterData_replaceData(this, 0, this._data.length, value);
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeImpl.prototype, "textContent", {
+ /**
+ * Returns the concatenation of data of all the {@link Text}
+ * node descendants in tree order. When set, replaces the text
+ * contents of the node with the given value.
+ */
+ get: function () {
+ if (util_1.Guard.isDocumentFragmentNode(this) || util_1.Guard.isElementNode(this)) {
+ return algorithm_1.text_descendantTextContent(this);
+ }
+ else if (util_1.Guard.isAttrNode(this)) {
+ return this._value;
+ }
+ else if (util_1.Guard.isCharacterDataNode(this)) {
+ return this._data;
+ }
+ else {
+ return null;
+ }
+ },
+ set: function (value) {
+ if (value === null) {
+ value = '';
+ }
+ if (util_1.Guard.isDocumentFragmentNode(this) || util_1.Guard.isElementNode(this)) {
+ algorithm_1.node_stringReplaceAll(value, this);
+ }
+ else if (util_1.Guard.isAttrNode(this)) {
+ algorithm_1.attr_setAnExistingAttributeValue(this, value);
+ }
+ else if (util_1.Guard.isCharacterDataNode(this)) {
+ algorithm_1.characterData_replaceData(this, 0, algorithm_1.tree_nodeLength(this), value);
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Puts all {@link Text} nodes in the full depth of the sub-tree
+ * underneath this node into a "normal" form where only markup
+ * (e.g., tags, comments, processing instructions, CDATA sections,
+ * and entity references) separates {@link Text} nodes, i.e., there
+ * are no adjacent Text nodes.
+ */
+ NodeImpl.prototype.normalize = function () {
+ var e_1, _a, e_2, _b;
+ /**
+ * The normalize() method, when invoked, must run these steps for each
+ * descendant exclusive Text node node of context object:
+ */
+ var descendantNodes = [];
+ var node = algorithm_1.tree_getFirstDescendantNode(this, false, false, function (e) { return util_1.Guard.isExclusiveTextNode(e); });
+ while (node !== null) {
+ descendantNodes.push(node);
+ node = algorithm_1.tree_getNextDescendantNode(this, node, false, false, function (e) { return util_1.Guard.isExclusiveTextNode(e); });
+ }
+ for (var i = 0; i < descendantNodes.length; i++) {
+ var node_1 = descendantNodes[i];
+ if (node_1._parent === null)
+ continue;
+ /**
+ * 1. Let length be node’s length.
+ * 2. If length is zero, then remove node and continue with the next
+ * exclusive Text node, if any.
+ */
+ var length = algorithm_1.tree_nodeLength(node_1);
+ if (length === 0) {
+ algorithm_1.mutation_remove(node_1, node_1._parent);
+ continue;
+ }
+ /**
+ * 3. Let data be the concatenation of the data of node’s contiguous
+ * exclusive Text nodes (excluding itself), in tree order.
+ */
+ var textSiblings = [];
+ var data = '';
+ try {
+ for (var _c = (e_1 = void 0, __values(algorithm_1.text_contiguousExclusiveTextNodes(node_1))), _d = _c.next(); !_d.done; _d = _c.next()) {
+ var sibling = _d.value;
+ textSiblings.push(sibling);
+ data += sibling._data;
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ /**
+ * 4. Replace data with node node, offset length, count 0, and data data.
+ */
+ algorithm_1.characterData_replaceData(node_1, length, 0, data);
+ /**
+ * 5. Let currentNode be node’s next sibling.
+ * 6. While currentNode is an exclusive Text node:
+ */
+ if (DOMImpl_1.dom.rangeList.size !== 0) {
+ var currentNode = node_1._nextSibling;
+ while (currentNode !== null && util_1.Guard.isExclusiveTextNode(currentNode)) {
+ /**
+ * 6.1. For each live range whose start node is currentNode, add length
+ * to its start offset and set its start node to node.
+ * 6.2. For each live range whose end node is currentNode, add length to
+ * its end offset and set its end node to node.
+ * 6.3. For each live range whose start node is currentNode’s parent and
+ * start offset is currentNode’s index, set its start node to node and
+ * its start offset to length.
+ * 6.4. For each live range whose end node is currentNode’s parent and
+ * end offset is currentNode’s index, set its end node to node and its
+ * end offset to length.
+ */
+ var cn = currentNode;
+ var index = algorithm_1.tree_index(cn);
+ try {
+ for (var _e = (e_2 = void 0, __values(DOMImpl_1.dom.rangeList)), _f = _e.next(); !_f.done; _f = _e.next()) {
+ var range = _f.value;
+ if (range._start[0] === cn) {
+ range._start[0] = node_1;
+ range._start[1] += length;
+ }
+ if (range._end[0] === cn) {
+ range._end[0] = node_1;
+ range._end[1] += length;
+ }
+ if (range._start[0] === cn._parent && range._start[1] === index) {
+ range._start[0] = node_1;
+ range._start[1] = length;
+ }
+ if (range._end[0] === cn._parent && range._end[1] === index) {
+ range._end[0] = node_1;
+ range._end[1] = length;
+ }
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ /**
+ * 6.5. Add currentNode’s length to length.
+ * 6.6. Set currentNode to its next sibling.
+ */
+ length += algorithm_1.tree_nodeLength(currentNode);
+ currentNode = currentNode._nextSibling;
+ }
+ }
+ /**
+ * 7. Remove node’s contiguous exclusive Text nodes (excluding itself),
+ * in tree order.
+ */
+ for (var i_1 = 0; i_1 < textSiblings.length; i_1++) {
+ var sibling = textSiblings[i_1];
+ if (sibling._parent === null)
+ continue;
+ algorithm_1.mutation_remove(sibling, sibling._parent);
+ }
+ }
+ };
+ /**
+ * Returns a duplicate of this node, i.e., serves as a generic copy
+ * constructor for nodes. The duplicate node has no parent
+ * ({@link parentNode} returns `null`).
+ *
+ * @param deep - if `true`, recursively clone the subtree under the
+ * specified node. If `false`, clone only the node itself (and its
+ * attributes, if it is an {@link Element}).
+ */
+ NodeImpl.prototype.cloneNode = function (deep) {
+ if (deep === void 0) { deep = false; }
+ /**
+ * 1. If context object is a shadow root, then throw a "NotSupportedError"
+ * DOMException.
+ * 2. Return a clone of the context object, with the clone children flag set
+ * if deep is true.
+ */
+ if (util_1.Guard.isShadowRoot(this))
+ throw new DOMException_1.NotSupportedError();
+ return algorithm_1.node_clone(this, null, deep);
+ };
+ /**
+ * Determines if the given node is equal to this one.
+ *
+ * @param node - the node to compare with
+ */
+ NodeImpl.prototype.isEqualNode = function (node) {
+ if (node === void 0) { node = null; }
+ /**
+ * The isEqualNode(otherNode) method, when invoked, must return true if
+ * otherNode is non-null and context object equals otherNode, and false
+ * otherwise.
+ */
+ return (node !== null && algorithm_1.node_equals(this, node));
+ };
+ /**
+ * Determines if the given node is reference equal to this one.
+ *
+ * @param node - the node to compare with
+ */
+ NodeImpl.prototype.isSameNode = function (node) {
+ if (node === void 0) { node = null; }
+ /**
+ * The isSameNode(otherNode) method, when invoked, must return true if
+ * otherNode is context object, and false otherwise.
+ */
+ return (this === node);
+ };
+ /**
+ * Returns a bitmask indicating the position of the given `node`
+ * relative to this node.
+ */
+ NodeImpl.prototype.compareDocumentPosition = function (other) {
+ /**
+ * 1. If context object is other, then return zero.
+ * 2. Let node1 be other and node2 be context object.
+ * 3. Let attr1 and attr2 be null.
+ * attr1’s element.
+ */
+ if (other === this)
+ return 0;
+ var node1 = other;
+ var node2 = this;
+ var attr1 = null;
+ var attr2 = null;
+ /**
+ * 4. If node1 is an attribute, then set attr1 to node1 and node1 to
+ * attr1’s element.
+ */
+ if (util_1.Guard.isAttrNode(node1)) {
+ attr1 = node1;
+ node1 = attr1._element;
+ }
+ /**
+ * 5. If node2 is an attribute, then:
+ */
+ if (util_1.Guard.isAttrNode(node2)) {
+ /**
+ * 5.1. Set attr2 to node2 and node2 to attr2’s element.
+ */
+ attr2 = node2;
+ node2 = attr2._element;
+ /**
+ * 5.2. If attr1 and node1 are non-null, and node2 is node1, then:
+ */
+ if (attr1 && node1 && (node1 === node2)) {
+ /**
+ * 5.2. For each attr in node2’s attribute list:
+ */
+ for (var i = 0; i < node2._attributeList.length; i++) {
+ var attr = node2._attributeList[i];
+ /**
+ * 5.2.1. If attr equals attr1, then return the result of adding
+ * DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC and
+ * DOCUMENT_POSITION_PRECEDING.
+ * 5.2.2. If attr equals attr2, then return the result of adding
+ * DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC and
+ * DOCUMENT_POSITION_FOLLOWING.
+ */
+ if (algorithm_1.node_equals(attr, attr1)) {
+ return interfaces_1.Position.ImplementationSpecific | interfaces_1.Position.Preceding;
+ }
+ else if (algorithm_1.node_equals(attr, attr2)) {
+ return interfaces_1.Position.ImplementationSpecific | interfaces_1.Position.Following;
+ }
+ }
+ }
+ }
+ /**
+ * 6. If node1 or node2 is null, or node1’s root is not node2’s root, then
+ * return the result of adding DOCUMENT_POSITION_DISCONNECTED,
+ * DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, and either
+ * DOCUMENT_POSITION_PRECEDING or DOCUMENT_POSITION_FOLLOWING,
+ * with the constraint that this is to be consistent, together.
+ */
+ if (node1 === null || node2 === null ||
+ algorithm_1.tree_rootNode(node1) !== algorithm_1.tree_rootNode(node2)) {
+ // nodes are disconnected
+ // return a random result but cache the value for consistency
+ return interfaces_1.Position.Disconnected | interfaces_1.Position.ImplementationSpecific |
+ (DOMImpl_1.dom.compareCache.check(this, other) ? interfaces_1.Position.Preceding : interfaces_1.Position.Following);
+ }
+ /**
+ * 7. If node1 is an ancestor of node2 and attr1 is null, or node1 is node2
+ * and attr2 is non-null, then return the result of adding
+ * DOCUMENT_POSITION_CONTAINS to DOCUMENT_POSITION_PRECEDING.
+ */
+ if ((!attr1 && algorithm_1.tree_isAncestorOf(node2, node1)) ||
+ (attr2 && (node1 === node2))) {
+ return interfaces_1.Position.Contains | interfaces_1.Position.Preceding;
+ }
+ /**
+ * 8. If node1 is a descendant of node2 and attr2 is null, or node1 is node2
+ * and attr1 is non-null, then return the result of adding
+ * DOCUMENT_POSITION_CONTAINED_BY to DOCUMENT_POSITION_FOLLOWING.
+ */
+ if ((!attr2 && algorithm_1.tree_isDescendantOf(node2, node1)) ||
+ (attr1 && (node1 === node2))) {
+ return interfaces_1.Position.ContainedBy | interfaces_1.Position.Following;
+ }
+ /**
+ * 9. If node1 is preceding node2, then return DOCUMENT_POSITION_PRECEDING.
+ */
+ if (algorithm_1.tree_isPreceding(node2, node1))
+ return interfaces_1.Position.Preceding;
+ /**
+ * 10. Return DOCUMENT_POSITION_FOLLOWING.
+ */
+ return interfaces_1.Position.Following;
+ };
+ /**
+ * Returns `true` if given node is an inclusive descendant of this
+ * node, and `false` otherwise (including when other node is `null`).
+ *
+ * @param other - the node to check
+ */
+ NodeImpl.prototype.contains = function (other) {
+ /**
+ * The contains(other) method, when invoked, must return true if other is an
+ * inclusive descendant of context object, and false otherwise (including
+ * when other is null).
+ */
+ if (other === null)
+ return false;
+ return algorithm_1.tree_isDescendantOf(this, other, true);
+ };
+ /**
+ * Returns the prefix for a given namespace URI, if present, and
+ * `null` if not.
+ *
+ * @param namespace - the namespace to search
+ */
+ NodeImpl.prototype.lookupPrefix = function (namespace) {
+ /**
+ * 1. If namespace is null or the empty string, then return null.
+ * 2. Switch on the context object:
+ */
+ if (!namespace)
+ return null;
+ if (util_1.Guard.isElementNode(this)) {
+ /**
+ * Return the result of locating a namespace prefix for it using
+ * namespace.
+ */
+ return algorithm_1.node_locateANamespacePrefix(this, namespace);
+ }
+ else if (util_1.Guard.isDocumentNode(this)) {
+ /**
+ * Return the result of locating a namespace prefix for its document
+ * element, if its document element is non-null, and null otherwise.
+ */
+ if (this.documentElement === null) {
+ return null;
+ }
+ else {
+ return algorithm_1.node_locateANamespacePrefix(this.documentElement, namespace);
+ }
+ }
+ else if (util_1.Guard.isDocumentTypeNode(this) || util_1.Guard.isDocumentFragmentNode(this)) {
+ return null;
+ }
+ else if (util_1.Guard.isAttrNode(this)) {
+ /**
+ * Return the result of locating a namespace prefix for its element,
+ * if its element is non-null, and null otherwise.
+ */
+ if (this._element === null) {
+ return null;
+ }
+ else {
+ return algorithm_1.node_locateANamespacePrefix(this._element, namespace);
+ }
+ }
+ else {
+ /**
+ * Return the result of locating a namespace prefix for its parent
+ * element, if its parent element is non-null, and null otherwise.
+ */
+ if (this._parent !== null && util_1.Guard.isElementNode(this._parent)) {
+ return algorithm_1.node_locateANamespacePrefix(this._parent, namespace);
+ }
+ else {
+ return null;
+ }
+ }
+ };
+ /**
+ * Returns the namespace URI for a given prefix if present, and `null`
+ * if not.
+ *
+ * @param prefix - the prefix to search
+ */
+ NodeImpl.prototype.lookupNamespaceURI = function (prefix) {
+ /**
+ * 1. If prefix is the empty string, then set it to null.
+ * 2. Return the result of running locate a namespace for the context object
+ * using prefix.
+ */
+ return algorithm_1.node_locateANamespace(this, prefix || null);
+ };
+ /**
+ * Returns `true` if the namespace is the default namespace on this
+ * node or `false` if not.
+ *
+ * @param namespace - the namespace to check
+ */
+ NodeImpl.prototype.isDefaultNamespace = function (namespace) {
+ /**
+ * 1. If namespace is the empty string, then set it to null.
+ * 2. Let defaultNamespace be the result of running locate a namespace for
+ * context object using null.
+ * 3. Return true if defaultNamespace is the same as namespace, and false otherwise.
+ */
+ if (!namespace)
+ namespace = null;
+ var defaultNamespace = algorithm_1.node_locateANamespace(this, null);
+ return (defaultNamespace === namespace);
+ };
+ /**
+ * Inserts the node `newChild` before the existing child node
+ * `refChild`. If `refChild` is `null`, inserts `newChild` at the end
+ * of the list of children.
+ *
+ * If `newChild` is a {@link DocumentFragment} object, all of its
+ * children are inserted, in the same order, before `refChild`.
+ *
+ * If `newChild` is already in the tree, it is first removed.
+ *
+ * @param newChild - the node to insert
+ * @param refChild - the node before which the new node must be
+ * inserted
+ *
+ * @returns the newly inserted child node
+ */
+ NodeImpl.prototype.insertBefore = function (newChild, refChild) {
+ /**
+ * The insertBefore(node, child) method, when invoked, must return the
+ * result of pre-inserting node into context object before child.
+ */
+ return algorithm_1.mutation_preInsert(newChild, this, refChild);
+ };
+ /**
+ * Adds the node `newChild` to the end of the list of children of this
+ * node, and returns it. If `newChild` is already in the tree, it is
+ * first removed.
+ *
+ * If `newChild` is a {@link DocumentFragment} object, the entire
+ * contents of the document fragment are moved into the child list of
+ * this node.
+ *
+ * @param newChild - the node to add
+ *
+ * @returns the newly inserted child node
+ */
+ NodeImpl.prototype.appendChild = function (newChild) {
+ /**
+ * The appendChild(node) method, when invoked, must return the result of
+ * appending node to context object.
+ */
+ return algorithm_1.mutation_append(newChild, this);
+ };
+ /**
+ * Replaces the child node `oldChild` with `newChild` in the list of
+ * children, and returns the `oldChild` node. If `newChild` is already
+ * in the tree, it is first removed.
+ *
+ * @param newChild - the new node to put in the child list
+ * @param oldChild - the node being replaced in the list
+ *
+ * @returns the removed child node
+ */
+ NodeImpl.prototype.replaceChild = function (newChild, oldChild) {
+ /**
+ * The replaceChild(node, child) method, when invoked, must return the
+ * result of replacing child with node within context object.
+ */
+ return algorithm_1.mutation_replace(oldChild, newChild, this);
+ };
+ /**
+ * Removes the child node indicated by `oldChild` from the list of
+ * children, and returns it.
+ *
+ * @param oldChild - the node being removed from the list
+ *
+ * @returns the removed child node
+ */
+ NodeImpl.prototype.removeChild = function (oldChild) {
+ /**
+ * The removeChild(child) method, when invoked, must return the result of
+ * pre-removing child from context object.
+ */
+ return algorithm_1.mutation_preRemove(oldChild, this);
+ };
+ /**
+ * Gets the parent event target for the given event.
+ *
+ * @param event - an event
+ */
+ NodeImpl.prototype._getTheParent = function (event) {
+ /**
+ * A node’s get the parent algorithm, given an event, returns the node’s
+ * assigned slot, if node is assigned, and node’s parent otherwise.
+ */
+ if (util_1.Guard.isSlotable(this) && algorithm_1.shadowTree_isAssigned(this)) {
+ return this._assignedSlot;
+ }
+ else {
+ return this._parent;
+ }
+ };
+ NodeImpl.ELEMENT_NODE = 1;
+ NodeImpl.ATTRIBUTE_NODE = 2;
+ NodeImpl.TEXT_NODE = 3;
+ NodeImpl.CDATA_SECTION_NODE = 4;
+ NodeImpl.ENTITY_REFERENCE_NODE = 5;
+ NodeImpl.ENTITY_NODE = 6;
+ NodeImpl.PROCESSING_INSTRUCTION_NODE = 7;
+ NodeImpl.COMMENT_NODE = 8;
+ NodeImpl.DOCUMENT_NODE = 9;
+ NodeImpl.DOCUMENT_TYPE_NODE = 10;
+ NodeImpl.DOCUMENT_FRAGMENT_NODE = 11;
+ NodeImpl.NOTATION_NODE = 12;
+ NodeImpl.DOCUMENT_POSITION_DISCONNECTED = 0x01;
+ NodeImpl.DOCUMENT_POSITION_PRECEDING = 0x02;
+ NodeImpl.DOCUMENT_POSITION_FOLLOWING = 0x04;
+ NodeImpl.DOCUMENT_POSITION_CONTAINS = 0x08;
+ NodeImpl.DOCUMENT_POSITION_CONTAINED_BY = 0x10;
+ NodeImpl.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
+ return NodeImpl;
+}(EventTargetImpl_1.EventTargetImpl));
+exports.NodeImpl = NodeImpl;
+/**
+ * A performance tweak to share an empty set between all node classes. This will
+ * be overwritten by element, document and document fragment nodes to supply an
+ * actual set of nodes.
+ */
+NodeImpl.prototype._children = new util_1.EmptySet();
+/**
+ * Define constants on prototype.
+ */
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "ELEMENT_NODE", 1);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "ATTRIBUTE_NODE", 2);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "TEXT_NODE", 3);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "CDATA_SECTION_NODE", 4);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "ENTITY_REFERENCE_NODE", 5);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "ENTITY_NODE", 6);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "PROCESSING_INSTRUCTION_NODE", 7);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "COMMENT_NODE", 8);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_NODE", 9);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_TYPE_NODE", 10);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_FRAGMENT_NODE", 11);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "NOTATION_NODE", 12);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_DISCONNECTED", 0x01);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_PRECEDING", 0x02);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_FOLLOWING", 0x04);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_CONTAINS", 0x08);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_CONTAINED_BY", 0x10);
+WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", 0x20);
+//# sourceMappingURL=NodeImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js.map
new file mode 100644
index 0000000..c6cbbd7
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"NodeImpl.js","sourceRoot":"","sources":["../../src/dom/NodeImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA+B;AAC/B,2CAIqB;AACrB,qDAAmD;AACnD,gCAAyC;AACzC,+CAAkD;AAClD,0CASqB;AACrB,+DAA8D;AAC9D,gEAA8D;AAE9D;;GAEG;AACH;IAAuC,4BAAe;IAgEpD;;OAEG;IACH;QAAA,YACE,iBAAO,SACR;QAZD,aAAO,GAAgB,IAAI,CAAA;QAE3B,iBAAW,GAAgB,IAAI,CAAA;QAC/B,gBAAU,GAAgB,IAAI,CAAA;QAC9B,sBAAgB,GAAgB,IAAI,CAAA;QACpC,kBAAY,GAAgB,IAAI,CAAA;;IAOhC,CAAC;IA1BD,sBAAI,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AS,EAAE,eAAe,EAAE,CAAC,CAAC,CAAA;AACvD,iCAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,EAAE,EAAE,CAAC,CAAA;AAC7D,iCAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,wBAAwB,EAAE,EAAE,CAAC,CAAA;AACjE,iCAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,eAAe,EAAE,EAAE,CAAC,CAAA;AAExD,iCAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,gCAAgC,EAAE,IAAI,CAAC,CAAA;AAC3E,iCAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,6BAA6B,EAAE,IAAI,CAAC,CAAA;AACxE,iCAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,6BAA6B,EAAE,IAAI,CAAC,CAAA;AACxE,iCAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,4BAA4B,EAAE,IAAI,CAAC,CAAA;AACvE,iCAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,gCAAgC,EAAE,IAAI,CAAC,CAAA;AAC3E,iCAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,2CAA2C,EAAE,IAAI,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.d.ts
new file mode 100644
index 0000000..b405e20
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.d.ts
@@ -0,0 +1,34 @@
+import { Node, NodeIterator, Collection } from "./interfaces";
+import { TraverserImpl } from "./TraverserImpl";
+/**
+ * Represents an object which can be used to iterate through the nodes
+ * of a subtree.
+ */
+export declare class NodeIteratorImpl extends TraverserImpl implements NodeIterator {
+ _iteratorCollection: Collection;
+ _reference: Node;
+ _pointerBeforeReference: boolean;
+ /**
+ * Initializes a new instance of `NodeIterator`.
+ */
+ private constructor();
+ /** @inheritdoc */
+ get referenceNode(): Node;
+ /** @inheritdoc */
+ get pointerBeforeReferenceNode(): boolean;
+ /** @inheritdoc */
+ nextNode(): Node | null;
+ /** @inheritdoc */
+ previousNode(): Node | null;
+ /** @inheritdoc */
+ detach(): void;
+ /**
+ * Creates a new `NodeIterator`.
+ *
+ * @param root - iterator's root node
+ * @param reference - reference node
+ * @param pointerBeforeReference - whether the iterator is before or after the
+ * reference node
+ */
+ static _create(root: Node, reference: Node, pointerBeforeReference: boolean): NodeIteratorImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js b/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js
new file mode 100644
index 0000000..a655467
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js
@@ -0,0 +1,86 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var TraverserImpl_1 = require("./TraverserImpl");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents an object which can be used to iterate through the nodes
+ * of a subtree.
+ */
+var NodeIteratorImpl = /** @class */ (function (_super) {
+ __extends(NodeIteratorImpl, _super);
+ /**
+ * Initializes a new instance of `NodeIterator`.
+ */
+ function NodeIteratorImpl(root, reference, pointerBeforeReference) {
+ var _this = _super.call(this, root) || this;
+ _this._iteratorCollection = undefined;
+ _this._reference = reference;
+ _this._pointerBeforeReference = pointerBeforeReference;
+ algorithm_1.nodeIterator_iteratorList().add(_this);
+ return _this;
+ }
+ Object.defineProperty(NodeIteratorImpl.prototype, "referenceNode", {
+ /** @inheritdoc */
+ get: function () { return this._reference; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NodeIteratorImpl.prototype, "pointerBeforeReferenceNode", {
+ /** @inheritdoc */
+ get: function () { return this._pointerBeforeReference; },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ NodeIteratorImpl.prototype.nextNode = function () {
+ /**
+ * The nextNode() method, when invoked, must return the result of
+ * traversing with the context object and next.
+ */
+ return algorithm_1.nodeIterator_traverse(this, true);
+ };
+ /** @inheritdoc */
+ NodeIteratorImpl.prototype.previousNode = function () {
+ /**
+ * The previousNode() method, when invoked, must return the result of
+ * traversing with the context object and previous.
+ */
+ return algorithm_1.nodeIterator_traverse(this, false);
+ };
+ /** @inheritdoc */
+ NodeIteratorImpl.prototype.detach = function () {
+ /**
+ * The detach() method, when invoked, must do nothing.
+ *
+ * since JS lacks weak references, we still use detach
+ */
+ algorithm_1.nodeIterator_iteratorList().delete(this);
+ };
+ /**
+ * Creates a new `NodeIterator`.
+ *
+ * @param root - iterator's root node
+ * @param reference - reference node
+ * @param pointerBeforeReference - whether the iterator is before or after the
+ * reference node
+ */
+ NodeIteratorImpl._create = function (root, reference, pointerBeforeReference) {
+ return new NodeIteratorImpl(root, reference, pointerBeforeReference);
+ };
+ return NodeIteratorImpl;
+}(TraverserImpl_1.TraverserImpl));
+exports.NodeIteratorImpl = NodeIteratorImpl;
+//# sourceMappingURL=NodeIteratorImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js.map
new file mode 100644
index 0000000..5248038
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"NodeIteratorImpl.js","sourceRoot":"","sources":["../../src/dom/NodeIteratorImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iDAA+C;AAC/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l.d.ts
new file mode 100644
index 0000000..78c8b01
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.d.ts
@@ -0,0 +1,46 @@
+import { Node, NodeList } from "./interfaces";
+/**
+ * Represents an ordered set of nodes.
+ */
+export declare class NodeListImpl implements NodeList {
+ _live: boolean;
+ _root: Node;
+ _filter: ((node: Node) => any) | null;
+ _length: number;
+ /**
+ * Initializes a new instance of `NodeList`.
+ *
+ * @param root - root node
+ */
+ private constructor();
+ /** @inheritdoc */
+ get length(): number;
+ /** @inheritdoc */
+ item(index: number): Node | null;
+ /** @inheritdoc */
+ [index: number]: Node | undefined;
+ /** @inheritdoc */
+ keys(): Iterable;
+ /** @inheritdoc */
+ values(): Iterable;
+ /** @inheritdoc */
+ entries(): Iterable<[number, Node]>;
+ /** @inheritdoc */
+ [Symbol.iterator](): Iterator;
+ /** @inheritdoc */
+ forEach(callback: ((node: Node, index: number, list: NodeList) => any), thisArg?: any): void;
+ /**
+ * Implements a proxy get trap to provide array-like access.
+ */
+ get(target: NodeList, key: PropertyKey, receiver: any): Node | undefined;
+ /**
+ * Implements a proxy set trap to provide array-like access.
+ */
+ set(target: NodeList, key: PropertyKey, value: Node, receiver: any): boolean;
+ /**
+ * Creates a new `NodeList`.
+ *
+ * @param root - root node
+ */
+ static _create(root: Node): NodeListImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js b/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js
new file mode 100644
index 0000000..e812ab2
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js
@@ -0,0 +1,198 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("./DOMImpl");
+var util_1 = require("@oozcitak/util");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents an ordered set of nodes.
+ */
+var NodeListImpl = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `NodeList`.
+ *
+ * @param root - root node
+ */
+ function NodeListImpl(root) {
+ this._live = true;
+ this._filter = null;
+ this._length = 0;
+ this._root = root;
+ return new Proxy(this, this);
+ }
+ Object.defineProperty(NodeListImpl.prototype, "length", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The length attribute must return the number of nodes represented
+ * by the collection.
+ */
+ return this._root._children.size;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ NodeListImpl.prototype.item = function (index) {
+ /**
+ * The item(index) method must return the indexth node in the collection.
+ * If there is no indexth node in the collection, then the method must
+ * return null.
+ */
+ if (index < 0 || index > this.length - 1)
+ return null;
+ if (index < this.length / 2) {
+ var i = 0;
+ var node = this._root._firstChild;
+ while (node !== null && i !== index) {
+ node = node._nextSibling;
+ i++;
+ }
+ return node;
+ }
+ else {
+ var i = this.length - 1;
+ var node = this._root._lastChild;
+ while (node !== null && i !== index) {
+ node = node._previousSibling;
+ i--;
+ }
+ return node;
+ }
+ };
+ /** @inheritdoc */
+ NodeListImpl.prototype.keys = function () {
+ var _a;
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var index = 0;
+ return {
+ next: function () {
+ if (index === this.length) {
+ return { done: true, value: null };
+ }
+ else {
+ return { done: false, value: index++ };
+ }
+ }.bind(this)
+ };
+ }.bind(this),
+ _a;
+ };
+ /** @inheritdoc */
+ NodeListImpl.prototype.values = function () {
+ var _a;
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var it = this[Symbol.iterator]();
+ return {
+ next: function () {
+ return it.next();
+ }
+ };
+ }.bind(this),
+ _a;
+ };
+ /** @inheritdoc */
+ NodeListImpl.prototype.entries = function () {
+ var _a;
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var it = this[Symbol.iterator]();
+ var index = 0;
+ return {
+ next: function () {
+ var itResult = it.next();
+ if (itResult.done) {
+ return { done: true, value: null };
+ }
+ else {
+ return { done: false, value: [index++, itResult.value] };
+ }
+ }
+ };
+ }.bind(this),
+ _a;
+ };
+ /** @inheritdoc */
+ NodeListImpl.prototype[Symbol.iterator] = function () {
+ return this._root._children[Symbol.iterator]();
+ };
+ /** @inheritdoc */
+ NodeListImpl.prototype.forEach = function (callback, thisArg) {
+ var e_1, _a;
+ if (thisArg === undefined) {
+ thisArg = DOMImpl_1.dom.window;
+ }
+ var index = 0;
+ try {
+ for (var _b = __values(this._root._children), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var node = _c.value;
+ callback.call(thisArg, node, index++, this);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ };
+ /**
+ * Implements a proxy get trap to provide array-like access.
+ */
+ NodeListImpl.prototype.get = function (target, key, receiver) {
+ if (!util_1.isString(key)) {
+ return Reflect.get(target, key, receiver);
+ }
+ var index = Number(key);
+ if (isNaN(index)) {
+ return Reflect.get(target, key, receiver);
+ }
+ return target.item(index) || undefined;
+ };
+ /**
+ * Implements a proxy set trap to provide array-like access.
+ */
+ NodeListImpl.prototype.set = function (target, key, value, receiver) {
+ if (!util_1.isString(key)) {
+ return Reflect.set(target, key, value, receiver);
+ }
+ var index = Number(key);
+ if (isNaN(index)) {
+ return Reflect.set(target, key, value, receiver);
+ }
+ var node = target.item(index) || undefined;
+ if (!node)
+ return false;
+ if (node._parent) {
+ algorithm_1.mutation_replace(node, value, node._parent);
+ return true;
+ }
+ else {
+ return false;
+ }
+ };
+ /**
+ * Creates a new `NodeList`.
+ *
+ * @param root - root node
+ */
+ NodeListImpl._create = function (root) {
+ return new NodeListImpl(root);
+ };
+ return NodeListImpl;
+}());
+exports.NodeListImpl = NodeListImpl;
+//# sourceMappingURL=NodeListImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js.map
new file mode 100644
index 0000000..96882bd
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"NodeListImpl.js","sourceRoot":"","sources":["../../src/dom/NodeListImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAA+B;AAE/B,uCAAyC;AACzC,0CAA+C;AAE/C;;GAEG;AACH;IAOE;;;;OAIG;IACH,sBAAoB,IAAU;QAV9B,UAAK,GAAY,IAAI,CAAA;QAErB,YAAO,GAAiC,IAAI,CAAA;QAC5C,YAAO,GAAG,CAAC,CAAA;QAQT,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QAEjB,OAAO,IAAI,KAAK,CAAe,IAAI,EAAE,IAAI,CAAC,CAAA;IAC5C,CAAC;IAGD,sBAAI,gCAAM;QADV,kBAAkB;aAClB;YACE;;;eAGG;YACH,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAA;QAClC,CAAC;;;OAAA;IAED,kBAAkB;IAClB,2BAAI,GAAJ,UAAK,KAAa;QAChB;;;;WAIG;QACH,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,IAAI,CAAA;QAErD,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,IAAI,CAAC,GAAG,CAAC,CAAA;YACT,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAA;YACjC,OAAO,IAAI,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,EAAE;gBACnC,IAAI,GAAG,IAAI,CAAC,YAAY,CAAA;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/@oozcitak/dom/lib/dom/NodeListStaticImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.d.ts
new file mode 100644
index 0000000..7323842
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.d.ts
@@ -0,0 +1,49 @@
+import { Node, NodeList } from "./interfaces";
+/**
+ * Represents an ordered list of nodes.
+ * This is a static implementation of `NodeList`.
+ */
+export declare class NodeListStaticImpl implements NodeList {
+ _live: boolean;
+ _root: Node;
+ _filter: ((element: Node) => any);
+ _items: Node[];
+ _length: number;
+ /**
+ * Initializes a new instance of `NodeList`.
+ *
+ * @param root - root node
+ */
+ private constructor();
+ /** @inheritdoc */
+ get length(): number;
+ /** @inheritdoc */
+ item(index: number): Node | null;
+ /** @inheritdoc */
+ [index: number]: Node | undefined;
+ /** @inheritdoc */
+ keys(): Iterable;
+ /** @inheritdoc */
+ values(): Iterable;
+ /** @inheritdoc */
+ entries(): Iterable<[number, Node]>;
+ /** @inheritdoc */
+ [Symbol.iterator](): Iterator;
+ /** @inheritdoc */
+ forEach(callback: (node: Node, index: number, list: NodeList) => any, thisArg?: any): void;
+ /**
+ * Implements a proxy get trap to provide array-like access.
+ */
+ get(target: NodeListStaticImpl, key: PropertyKey, receiver: any): Node | undefined;
+ /**
+ * Implements a proxy set trap to provide array-like access.
+ */
+ set(target: NodeListStaticImpl, key: PropertyKey, value: Node, receiver: any): boolean;
+ /**
+ * Creates a new `NodeList`.
+ *
+ * @param root - root node
+ * @param items - a list of items to initialize the list
+ */
+ static _create(root: Node, items: Node[]): NodeListStaticImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js b/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js
new file mode 100644
index 0000000..40326b7
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js
@@ -0,0 +1,188 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("./DOMImpl");
+var util_1 = require("@oozcitak/util");
+/**
+ * Represents an ordered list of nodes.
+ * This is a static implementation of `NodeList`.
+ */
+var NodeListStaticImpl = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `NodeList`.
+ *
+ * @param root - root node
+ */
+ function NodeListStaticImpl(root) {
+ this._live = false;
+ this._items = [];
+ this._length = 0;
+ this._root = root;
+ this._items = [];
+ this._filter = function (node) { return true; };
+ return new Proxy(this, this);
+ }
+ Object.defineProperty(NodeListStaticImpl.prototype, "length", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The length attribute must return the number of nodes represented by
+ * the collection.
+ */
+ return this._items.length;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ NodeListStaticImpl.prototype.item = function (index) {
+ /**
+ * The item(index) method must return the indexth node in the collection.
+ * If there is no indexth node in the collection, then the method must
+ * return null.
+ */
+ if (index < 0 || index > this.length - 1)
+ return null;
+ return this._items[index];
+ };
+ /** @inheritdoc */
+ NodeListStaticImpl.prototype.keys = function () {
+ var _a;
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var index = 0;
+ return {
+ next: function () {
+ if (index === this.length) {
+ return { done: true, value: null };
+ }
+ else {
+ return { done: false, value: index++ };
+ }
+ }.bind(this)
+ };
+ }.bind(this),
+ _a;
+ };
+ /** @inheritdoc */
+ NodeListStaticImpl.prototype.values = function () {
+ var _a;
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var it = this[Symbol.iterator]();
+ return {
+ next: function () {
+ return it.next();
+ }
+ };
+ }.bind(this),
+ _a;
+ };
+ /** @inheritdoc */
+ NodeListStaticImpl.prototype.entries = function () {
+ var _a;
+ return _a = {},
+ _a[Symbol.iterator] = function () {
+ var it = this[Symbol.iterator]();
+ var index = 0;
+ return {
+ next: function () {
+ var itResult = it.next();
+ if (itResult.done) {
+ return { done: true, value: null };
+ }
+ else {
+ return { done: false, value: [index++, itResult.value] };
+ }
+ }
+ };
+ }.bind(this),
+ _a;
+ };
+ /** @inheritdoc */
+ NodeListStaticImpl.prototype[Symbol.iterator] = function () {
+ var it = this._items[Symbol.iterator]();
+ return {
+ next: function () {
+ return it.next();
+ }
+ };
+ };
+ /** @inheritdoc */
+ NodeListStaticImpl.prototype.forEach = function (callback, thisArg) {
+ var e_1, _a;
+ if (thisArg === undefined) {
+ thisArg = DOMImpl_1.dom.window;
+ }
+ var index = 0;
+ try {
+ for (var _b = __values(this._items), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var node = _c.value;
+ callback.call(thisArg, node, index++, this);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ };
+ /**
+ * Implements a proxy get trap to provide array-like access.
+ */
+ NodeListStaticImpl.prototype.get = function (target, key, receiver) {
+ if (!util_1.isString(key)) {
+ return Reflect.get(target, key, receiver);
+ }
+ var index = Number(key);
+ if (isNaN(index)) {
+ return Reflect.get(target, key, receiver);
+ }
+ return target._items[index] || undefined;
+ };
+ /**
+ * Implements a proxy set trap to provide array-like access.
+ */
+ NodeListStaticImpl.prototype.set = function (target, key, value, receiver) {
+ if (!util_1.isString(key)) {
+ return Reflect.set(target, key, value, receiver);
+ }
+ var index = Number(key);
+ if (isNaN(index)) {
+ return Reflect.set(target, key, value, receiver);
+ }
+ if (index >= 0 && index < target._items.length) {
+ target._items[index] = value;
+ return true;
+ }
+ else {
+ return false;
+ }
+ };
+ /**
+ * Creates a new `NodeList`.
+ *
+ * @param root - root node
+ * @param items - a list of items to initialize the list
+ */
+ NodeListStaticImpl._create = function (root, items) {
+ var list = new NodeListStaticImpl(root);
+ list._items = items;
+ return list;
+ };
+ return NodeListStaticImpl;
+}());
+exports.NodeListStaticImpl = NodeListStaticImpl;
+//# sourceMappingURL=NodeListStaticImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js.map
new file mode 100644
index 0000000..a6def98
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"NodeListStaticImpl.js","sourceRoot":"","sources":["../../src/dom/NodeListStaticImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAA+B;AAE/B,uCAAyC;AAEzC;;;GAGG;AACH;IAQE;;;;OAIG;IACH,4BAAoB,IAAU;QAX9B,UAAK,GAAY,KAAK,CAAA;QAGtB,WAAM,GAAW,EAAE,CAAA;QACnB,YAAO,GAAG,CAAC,CAAA;QAQT,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAA;QAChB,IAAI,CAAC,OAAO,GAAG,UAAU,IAAU,IAAI,OAAO,IAAI,CAAA,CAAC,CAAC,CAAA;QAEpD,OAAO,IAAI,KAAK,CAAqB,IAAI,EAAE,IAAI,CAAC,CAAA;IAClD,CAAC;IAGD,sBAAI,sCAAM;QADV,kBAAkB;aAClB;YACE;;;eAGG;YACH,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAA;QAC3B,CAAC;;;OAAA;IAED,kBAAkB;IAClB,iCAAI,GAAJ,UAAK,KAAa;QAChB;;;;WAIG;QACH,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,IAAI,CAAA;QAErD,OAAO,IAAI,CAAC,MAAM,CAAC,KAA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AM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,SAAS,CAAA;IAC1C,CAAC;IAED;;OAEG;IACH,gCAAG,GAAH,UAAI,MAA0B,EAAE,GAAgB,EAAE,KAAW,EAAE,QAAa;QAC1E,IAAI,CAAC,eAAQ,CAAC,GAAG,CAAC,EAAE;YAClB,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAA;SACjD;QAED,IAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;QACzB,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE;YAChB,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAA;SACjD;QAED,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;YAC9C,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;YAC5B,OAAO,IAAI,CAAA;SACZ;aAAM;YACL,OAAO,KAAK,CAAA;SACb;IACH,CAAC;IAED;;;;;OAKG;IACI,0BAAO,GAAd,UAAe,IAAU,EAAE,KAAa;QACtC,IAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAA;QACzC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;QACnB,OAAO,IAAI,CAAA;IACb,CAAC;IAEH,yBAAC;AAAD,CAAC,AA/KD,IA+KC;AA/KY,gDAAkB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.d.ts
new file mode 100644
index 0000000..b42abf4
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.d.ts
@@ -0,0 +1,12 @@
+import { Element, NonDocumentTypeChildNode } from "./interfaces";
+/**
+ * Represents a mixin that extends child nodes that can have siblings
+ * other than doctypes. This mixin is implemented by {@link Element} and
+ * {@link CharacterData}.
+ */
+export declare class NonDocumentTypeChildNodeImpl implements NonDocumentTypeChildNode {
+ /** @inheritdoc */
+ get previousElementSibling(): Element | null;
+ /** @inheritdoc */
+ get nextElementSibling(): Element | null;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js b/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js
new file mode 100644
index 0000000..debca7a
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js
@@ -0,0 +1,53 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("../util");
+/**
+ * Represents a mixin that extends child nodes that can have siblings
+ * other than doctypes. This mixin is implemented by {@link Element} and
+ * {@link CharacterData}.
+ */
+var NonDocumentTypeChildNodeImpl = /** @class */ (function () {
+ function NonDocumentTypeChildNodeImpl() {
+ }
+ Object.defineProperty(NonDocumentTypeChildNodeImpl.prototype, "previousElementSibling", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The previousElementSibling attribute’s getter must return the first
+ * preceding sibling that is an element, and null otherwise.
+ */
+ var node = util_1.Cast.asNode(this)._previousSibling;
+ while (node) {
+ if (util_1.Guard.isElementNode(node))
+ return node;
+ else
+ node = node._previousSibling;
+ }
+ return null;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(NonDocumentTypeChildNodeImpl.prototype, "nextElementSibling", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The nextElementSibling attribute’s getter must return the first
+ * following sibling that is an element, and null otherwise.
+ */
+ var node = util_1.Cast.asNode(this)._nextSibling;
+ while (node) {
+ if (util_1.Guard.isElementNode(node))
+ return node;
+ else
+ node = node._nextSibling;
+ }
+ return null;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return NonDocumentTypeChildNodeImpl;
+}());
+exports.NonDocumentTypeChildNodeImpl = NonDocumentTypeChildNodeImpl;
+//# sourceMappingURL=NonDocumentTypeChildNodeImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js.map
new file mode 100644
index 0000000..ca51930
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"NonDocumentTypeChildNodeImpl.js","sourceRoot":"","sources":["../../src/dom/NonDocumentTypeChildNodeImpl.ts"],"names":[],"mappings":";;AACA,gCAAqC;AAErC;;;;GAIG;AACH;IAAA;IAkCA,CAAC;IA/BC,sBAAI,gEAAsB;QAD1B,kBAAkB;aAClB;YACE;;;eAGG;YACH,IAAI,IAAI,GAAG,WAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAA;YAC7C,OAAO,IAAI,EAAE;gBACX,IAAI,YAAK,CAAC,aAAa,CAAC,IAAI,CAAC;oBAC3B,OAAO,IAAI,CAAA;;oBAEX,IAAI,GAAG,IAAI,CAAC,gBAAgB,CAAA;aAC/B;YACD,OAAO,IAAI,CAAA;QACb,CAAC;;;OAAA;IAGD,sBAAI,4DAAkB;QADtB,kBAAkB;aAClB;YACE;;;eAGG;YACH,IAAI,IAAI,GAAG,WAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,YAAY,CAAA;YACzC,OAAO,IAAI,EAAE;gBACX,IAAI,YAAK,CAAC,aAAa,CAAC,IAAI,CAAC;oBAC3B,OAAO,IAAI,CAAA;;oBAEX,IAAI,GAAG,IAAI,CAAC,YAAY,CAAA;aAC3B;YACD,OAAO,IAAI,CAAA;QACb,CAAC;;;OAAA;IAEH,mCAAC;AAAD,CAAC,AAlCD,IAkCC;AAlCY,oEAA4B"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.d.ts
new file mode 100644
index 0000000..b3860b0
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.d.ts
@@ -0,0 +1,9 @@
+import { Element, NonElementParentNode } from "./interfaces";
+/**
+ * Represents a mixin that extends non-element parent nodes. This mixin
+ * is implemented by {@link Document} and {@link DocumentFragment}.
+ */
+export declare class NonElementParentNodeImpl implements NonElementParentNode {
+ /** @inheritdoc */
+ getElementById(id: string): Element | null;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js b/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js
new file mode 100644
index 0000000..79f19bd
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js
@@ -0,0 +1,31 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("../util");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents a mixin that extends non-element parent nodes. This mixin
+ * is implemented by {@link Document} and {@link DocumentFragment}.
+ */
+var NonElementParentNodeImpl = /** @class */ (function () {
+ function NonElementParentNodeImpl() {
+ }
+ /** @inheritdoc */
+ NonElementParentNodeImpl.prototype.getElementById = function (id) {
+ /**
+ * The getElementById(elementId) method, when invoked, must return the first
+ * element, in tree order, within the context object’s descendants,
+ * whose ID is elementId, and null if there is no such element otherwise.
+ */
+ var ele = algorithm_1.tree_getFirstDescendantNode(util_1.Cast.asNode(this), false, false, function (e) { return util_1.Guard.isElementNode(e); });
+ while (ele !== null) {
+ if (ele._uniqueIdentifier === id) {
+ return ele;
+ }
+ ele = algorithm_1.tree_getNextDescendantNode(util_1.Cast.asNode(this), ele, false, false, function (e) { return util_1.Guard.isElementNode(e); });
+ }
+ return null;
+ };
+ return NonElementParentNodeImpl;
+}());
+exports.NonElementParentNodeImpl = NonElementParentNodeImpl;
+//# sourceMappingURL=NonElementParentNodeImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js.map
new file mode 100644
index 0000000..472edf8
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"NonElementParentNodeImpl.js","sourceRoot":"","sources":["../../src/dom/NonElementParentNodeImpl.ts"],"names":[],"mappings":";;AACA,gCAAqC;AACrC,0CAAsF;AAEtF;;;GAGG;AACH;IAAA;IAsBA,CAAC;IApBC,kBAAkB;IAClB,iDAAc,GAAd,UAAe,EAAU;QACvB;;;;WAIG;QACH,IAAI,GAAG,GAAG,uCAA2B,CAAC,WAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EACnE,UAAC,CAAC,IAAK,OAAA,YAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAtB,CAAsB,CAAmB,CAAA;QAClD,OAAO,GAAG,KAAK,IAAI,EAAE;YACnB,IAAI,GAAG,CAAC,iBAAiB,KAAK,EAAE,EAAE;gBAChC,OAAO,GAAG,CAAA;aACX;YACD,GAAG,GAAG,sCAA0B,CAAC,WAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EACnE,UAAC,CAAC,IAAK,OAAA,YAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAtB,CAAsB,CAAmB,CAAA;SACnD;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAEH,+BAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,4DAAwB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.d.ts
new file mode 100644
index 0000000..d6ff69a
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.d.ts
@@ -0,0 +1,24 @@
+import { Node, HTMLCollection, NodeList, Element, ParentNode } from "./interfaces";
+/**
+ * Represents a mixin that extends parent nodes that can have children.
+ * This mixin is implemented by {@link Element}, {@link Document} and
+ * {@link DocumentFragment}.
+ */
+export declare class ParentNodeImpl implements ParentNode {
+ /** @inheritdoc */
+ get children(): HTMLCollection;
+ /** @inheritdoc */
+ get firstElementChild(): Element | null;
+ /** @inheritdoc */
+ get lastElementChild(): Element | null;
+ /** @inheritdoc */
+ get childElementCount(): number;
+ /** @inheritdoc */
+ prepend(...nodes: (Node | string)[]): void;
+ /** @inheritdoc */
+ append(...nodes: (Node | string)[]): void;
+ /** @inheritdoc */
+ querySelector(selectors: string): Element | null;
+ /** @inheritdoc */
+ querySelectorAll(selectors: string): NodeList;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js b/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js
new file mode 100644
index 0000000..288618b
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js
@@ -0,0 +1,158 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("../util");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents a mixin that extends parent nodes that can have children.
+ * This mixin is implemented by {@link Element}, {@link Document} and
+ * {@link DocumentFragment}.
+ */
+var ParentNodeImpl = /** @class */ (function () {
+ function ParentNodeImpl() {
+ }
+ Object.defineProperty(ParentNodeImpl.prototype, "children", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The children attribute’s getter must return an HTMLCollection collection
+ * rooted at context object matching only element children.
+ */
+ return algorithm_1.create_htmlCollection(util_1.Cast.asNode(this));
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ParentNodeImpl.prototype, "firstElementChild", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The firstElementChild attribute’s getter must return the first child
+ * that is an element, and null otherwise.
+ */
+ var node = util_1.Cast.asNode(this)._firstChild;
+ while (node) {
+ if (util_1.Guard.isElementNode(node))
+ return node;
+ else
+ node = node._nextSibling;
+ }
+ return null;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ParentNodeImpl.prototype, "lastElementChild", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The lastElementChild attribute’s getter must return the last child that
+ * is an element, and null otherwise.
+ */
+ var node = util_1.Cast.asNode(this)._lastChild;
+ while (node) {
+ if (util_1.Guard.isElementNode(node))
+ return node;
+ else
+ node = node._previousSibling;
+ }
+ return null;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ParentNodeImpl.prototype, "childElementCount", {
+ /** @inheritdoc */
+ get: function () {
+ var e_1, _a;
+ /**
+ * The childElementCount attribute’s getter must return the number of
+ * children of context object that are elements.
+ */
+ var count = 0;
+ try {
+ for (var _b = __values(util_1.Cast.asNode(this)._children), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var childNode = _c.value;
+ if (util_1.Guard.isElementNode(childNode))
+ count++;
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ return count;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ ParentNodeImpl.prototype.prepend = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ /**
+ * 1. Let node be the result of converting nodes into a node given nodes
+ * and context object’s node document.
+ * 2. Pre-insert node into context object before the context object’s first
+ * child.
+ */
+ var node = util_1.Cast.asNode(this);
+ var childNode = algorithm_1.parentNode_convertNodesIntoANode(nodes, node._nodeDocument);
+ algorithm_1.mutation_preInsert(childNode, node, node._firstChild);
+ };
+ /** @inheritdoc */
+ ParentNodeImpl.prototype.append = function () {
+ var nodes = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ nodes[_i] = arguments[_i];
+ }
+ /**
+ * 1. Let node be the result of converting nodes into a node given nodes
+ * and context object’s node document.
+ * 2. Append node to context object.
+ */
+ var node = util_1.Cast.asNode(this);
+ var childNode = algorithm_1.parentNode_convertNodesIntoANode(nodes, node._nodeDocument);
+ algorithm_1.mutation_append(childNode, node);
+ };
+ /** @inheritdoc */
+ ParentNodeImpl.prototype.querySelector = function (selectors) {
+ /**
+ * The querySelector(selectors) method, when invoked, must return the first
+ * result of running scope-match a selectors string selectors against
+ * context object, if the result is not an empty list, and null otherwise.
+ */
+ var node = util_1.Cast.asNode(this);
+ var result = algorithm_1.selectors_scopeMatchASelectorsString(selectors, node);
+ return (result.length === 0 ? null : result[0]);
+ };
+ /** @inheritdoc */
+ ParentNodeImpl.prototype.querySelectorAll = function (selectors) {
+ /**
+ * The querySelectorAll(selectors) method, when invoked, must return the
+ * static result of running scope-match a selectors string selectors against
+ * context object.
+ */
+ var node = util_1.Cast.asNode(this);
+ var result = algorithm_1.selectors_scopeMatchASelectorsString(selectors, node);
+ return algorithm_1.create_nodeListStatic(node, result);
+ };
+ return ParentNodeImpl;
+}());
+exports.ParentNodeImpl = ParentNodeImpl;
+//# sourceMappingURL=ParentNodeImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js.map
new file mode 100644
index 0000000..16e7120
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ParentNodeImpl.js","s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M,GAAG,gDAAoC,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;QACpE,OAAO,iCAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAC5C,CAAC;IAEH,qBAAC;AAAD,CAAC,AAjHD,IAiHC;AAjHY,wCAAc"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.d.ts
new file mode 100644
index 0000000..ebc9331
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.d.ts
@@ -0,0 +1,25 @@
+import { NodeType, ProcessingInstruction, Document } from "./interfaces";
+import { CharacterDataImpl } from "./CharacterDataImpl";
+/**
+ * Represents a processing instruction node.
+ */
+export declare class ProcessingInstructionImpl extends CharacterDataImpl implements ProcessingInstruction {
+ _nodeType: NodeType;
+ _target: string;
+ /**
+ * Initializes a new instance of `ProcessingInstruction`.
+ */
+ private constructor();
+ /**
+ * Gets the target of the {@link ProcessingInstruction} node.
+ */
+ get target(): string;
+ /**
+ * Creates a new `ProcessingInstruction`.
+ *
+ * @param document - owner document
+ * @param target - instruction target
+ * @param data - node contents
+ */
+ static _create(document: Document, target: string, data: string): ProcessingInstructionImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js b/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js
new file mode 100644
index 0000000..02a2be2
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js
@@ -0,0 +1,59 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("./interfaces");
+var CharacterDataImpl_1 = require("./CharacterDataImpl");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+/**
+ * Represents a processing instruction node.
+ */
+var ProcessingInstructionImpl = /** @class */ (function (_super) {
+ __extends(ProcessingInstructionImpl, _super);
+ /**
+ * Initializes a new instance of `ProcessingInstruction`.
+ */
+ function ProcessingInstructionImpl(target, data) {
+ var _this = _super.call(this, data) || this;
+ _this._target = target;
+ return _this;
+ }
+ Object.defineProperty(ProcessingInstructionImpl.prototype, "target", {
+ /**
+ * Gets the target of the {@link ProcessingInstruction} node.
+ */
+ get: function () { return this._target; },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Creates a new `ProcessingInstruction`.
+ *
+ * @param document - owner document
+ * @param target - instruction target
+ * @param data - node contents
+ */
+ ProcessingInstructionImpl._create = function (document, target, data) {
+ var node = new ProcessingInstructionImpl(target, data);
+ node._nodeDocument = document;
+ return node;
+ };
+ return ProcessingInstructionImpl;
+}(CharacterDataImpl_1.CharacterDataImpl));
+exports.ProcessingInstructionImpl = ProcessingInstructionImpl;
+/**
+ * Initialize prototype properties
+ */
+WebIDLAlgorithm_1.idl_defineConst(ProcessingInstructionImpl.prototype, "_nodeType", interfaces_1.NodeType.ProcessingInstruction);
+//# sourceMappingURL=ProcessingInstructionImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js.map
new file mode 100644
index 0000000..732ceb6
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ProcessingInstructionImpl.js","sourceRoot":"","sources":["../../src/dom/ProcessingInstructionImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwE;AACxE,yDAAuD;AACvD,gEAA8D;AAE9D;;GAEG;AACH;IAA+C,6CAAiB;IAM9D;;OAEG;IACH,mCAAoB,MAAc,EAAE,IAAY;QAAhD,YACE,kBAAM,IAAI,CAAC,SAGZ;QADC,KAAI,CAAC,OAAO,GAAG,MAAM,CAAA;;IACvB,CAAC;IAKD,sBAAI,6CAAM;QAHV;;WAEG;aACH,cAAuB,OAAO,IAAI,CAAC,OAAO,CAAA,CAAC,CAAC;;;OAAA;IAE5C;;;;;;OAMG;IACI,iCAAO,GAAd,UAAe,QAAkB,EAAE,MAAc,EAC/C,IAAY;QACZ,IAAM,IAAI,GAAG,IAAI,yBAAyB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACxD,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAA;QAC7B,OAAO,IAAI,CAAA;IACb,CAAC;IAEH,gCAAC;AAAD,CAAC,AAlCD,CAA+C,qCAAiB,GAkC/D;AAlCY,8DAAyB;AAoCtC;;GAEG;AACH,iCAAe,CAAC,yBAAyB,CAAC,SAAS,EAAE,WAAW,EAAE,qBAAQ,CAAC,qBAAqB,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/RangeImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/RangeImpl.d.ts
new file mode 100644
index 0000000..1d25993
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/RangeImpl.d.ts
@@ -0,0 +1,71 @@
+import { Node, Range, HowToCompare, DocumentFragment, BoundaryPoint } from "./interfaces";
+import { AbstractRangeImpl } from "./AbstractRangeImpl";
+/**
+ * Represents a live range.
+ */
+export declare class RangeImpl extends AbstractRangeImpl implements Range {
+ static START_TO_START: number;
+ static START_TO_END: number;
+ static END_TO_END: number;
+ static END_TO_START: number;
+ START_TO_START: number;
+ START_TO_END: number;
+ END_TO_END: number;
+ END_TO_START: number;
+ _start: BoundaryPoint;
+ _end: BoundaryPoint;
+ /**
+ * Initializes a new instance of `Range`.
+ */
+ constructor();
+ /** @inheritdoc */
+ get commonAncestorContainer(): Node;
+ /** @inheritdoc */
+ setStart(node: Node, offset: number): void;
+ /** @inheritdoc */
+ setEnd(node: Node, offset: number): void;
+ /** @inheritdoc */
+ setStartBefore(node: Node): void;
+ /** @inheritdoc */
+ setStartAfter(node: Node): void;
+ /** @inheritdoc */
+ setEndBefore(node: Node): void;
+ /** @inheritdoc */
+ setEndAfter(node: Node): void;
+ /** @inheritdoc */
+ collapse(toStart?: boolean | undefined): void;
+ /** @inheritdoc */
+ selectNode(node: Node): void;
+ /** @inheritdoc */
+ selectNodeContents(node: Node): void;
+ /** @inheritdoc */
+ compareBoundaryPoints(how: HowToCompare, sourceRange: Range): number;
+ /** @inheritdoc */
+ deleteContents(): void;
+ /** @inheritdoc */
+ extractContents(): DocumentFragment;
+ /** @inheritdoc */
+ cloneContents(): DocumentFragment;
+ /** @inheritdoc */
+ insertNode(node: Node): void;
+ /** @inheritdoc */
+ surroundContents(newParent: Node): void;
+ /** @inheritdoc */
+ cloneRange(): Range;
+ /** @inheritdoc */
+ detach(): void;
+ /** @inheritdoc */
+ isPointInRange(node: Node, offset: number): boolean;
+ /** @inheritdoc */
+ comparePoint(node: Node, offset: number): number;
+ /** @inheritdoc */
+ intersectsNode(node: Node): boolean;
+ toString(): string;
+ /**
+ * Creates a new `Range`.
+ *
+ * @param start - start point
+ * @param end - end point
+ */
+ static _create(start?: BoundaryPoint, end?: BoundaryPoint): RangeImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js b/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js
new file mode 100644
index 0000000..a714493
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js
@@ -0,0 +1,649 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var DOMImpl_1 = require("./DOMImpl");
+var interfaces_1 = require("./interfaces");
+var AbstractRangeImpl_1 = require("./AbstractRangeImpl");
+var DOMException_1 = require("./DOMException");
+var algorithm_1 = require("../algorithm");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+var util_1 = require("../util");
+/**
+ * Represents a live range.
+ */
+var RangeImpl = /** @class */ (function (_super) {
+ __extends(RangeImpl, _super);
+ /**
+ * Initializes a new instance of `Range`.
+ */
+ function RangeImpl() {
+ var _this = _super.call(this) || this;
+ /**
+ * The Range() constructor, when invoked, must return a new live range with
+ * (current global object’s associated Document, 0) as its start and end.
+ */
+ var doc = DOMImpl_1.dom.window._associatedDocument;
+ _this._start = [doc, 0];
+ _this._end = [doc, 0];
+ DOMImpl_1.dom.rangeList.add(_this);
+ return _this;
+ }
+ Object.defineProperty(RangeImpl.prototype, "commonAncestorContainer", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * 1. Let container be start node.
+ * 2. While container is not an inclusive ancestor of end node, let
+ * container be container’s parent.
+ * 3. Return container.
+ */
+ var container = this._start[0];
+ while (!algorithm_1.tree_isAncestorOf(this._end[0], container, true)) {
+ if (container._parent === null) {
+ throw new Error("Parent node is null.");
+ }
+ container = container._parent;
+ }
+ return container;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ RangeImpl.prototype.setStart = function (node, offset) {
+ /**
+ * The setStart(node, offset) method, when invoked, must set the start of
+ * context object to boundary point (node, offset).
+ */
+ algorithm_1.range_setTheStart(this, node, offset);
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.setEnd = function (node, offset) {
+ /**
+ * The setEnd(node, offset) method, when invoked, must set the end of
+ * context object to boundary point (node, offset).
+ */
+ algorithm_1.range_setTheEnd(this, node, offset);
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.setStartBefore = function (node) {
+ /**
+ * 1. Let parent be node’s parent.
+ * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException.
+ * 3. Set the start of the context object to boundary point
+ * (parent, node’s index).
+ */
+ var parent = node._parent;
+ if (parent === null)
+ throw new DOMException_1.InvalidNodeTypeError();
+ algorithm_1.range_setTheStart(this, parent, algorithm_1.tree_index(node));
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.setStartAfter = function (node) {
+ /**
+ * 1. Let parent be node’s parent.
+ * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException.
+ * 3. Set the start of the context object to boundary point
+ * (parent, node’s index plus 1).
+ */
+ var parent = node._parent;
+ if (parent === null)
+ throw new DOMException_1.InvalidNodeTypeError();
+ algorithm_1.range_setTheStart(this, parent, algorithm_1.tree_index(node) + 1);
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.setEndBefore = function (node) {
+ /**
+ * 1. Let parent be node’s parent.
+ * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException.
+ * 3. Set the end of the context object to boundary point
+ * (parent, node’s index).
+ */
+ var parent = node._parent;
+ if (parent === null)
+ throw new DOMException_1.InvalidNodeTypeError();
+ algorithm_1.range_setTheEnd(this, parent, algorithm_1.tree_index(node));
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.setEndAfter = function (node) {
+ /**
+ * 1. Let parent be node’s parent.
+ * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException.
+ * 3. Set the end of the context object to boundary point
+ * (parent, node’s index plus 1).
+ */
+ var parent = node._parent;
+ if (parent === null)
+ throw new DOMException_1.InvalidNodeTypeError();
+ algorithm_1.range_setTheEnd(this, parent, algorithm_1.tree_index(node) + 1);
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.collapse = function (toStart) {
+ /**
+ * The collapse(toStart) method, when invoked, must if toStart is true,
+ * set end to start, and set start to end otherwise.
+ */
+ if (toStart) {
+ this._end = this._start;
+ }
+ else {
+ this._start = this._end;
+ }
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.selectNode = function (node) {
+ /**
+ * The selectNode(node) method, when invoked, must select node within
+ * context object.
+ */
+ algorithm_1.range_select(node, this);
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.selectNodeContents = function (node) {
+ /**
+ * 1. If node is a doctype, throw an "InvalidNodeTypeError" DOMException.
+ * 2. Let length be the length of node.
+ * 3. Set start to the boundary point (node, 0).
+ * 4. Set end to the boundary point (node, length).
+ */
+ if (util_1.Guard.isDocumentTypeNode(node))
+ throw new DOMException_1.InvalidNodeTypeError();
+ var length = algorithm_1.tree_nodeLength(node);
+ this._start = [node, 0];
+ this._end = [node, length];
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.compareBoundaryPoints = function (how, sourceRange) {
+ /**
+ * 1. If how is not one of
+ * - START_TO_START,
+ * - START_TO_END,
+ * - END_TO_END, and
+ * - END_TO_START,
+ * then throw a "NotSupportedError" DOMException.
+ */
+ if (how !== interfaces_1.HowToCompare.StartToStart && how !== interfaces_1.HowToCompare.StartToEnd &&
+ how !== interfaces_1.HowToCompare.EndToEnd && how !== interfaces_1.HowToCompare.EndToStart)
+ throw new DOMException_1.NotSupportedError();
+ /**
+ * 2. If context object’s root is not the same as sourceRange’s root,
+ * then throw a "WrongDocumentError" DOMException.
+ */
+ if (algorithm_1.range_root(this) !== algorithm_1.range_root(sourceRange))
+ throw new DOMException_1.WrongDocumentError();
+ /**
+ * 3. If how is:
+ * - START_TO_START:
+ * Let this point be the context object’s start. Let other point be
+ * sourceRange’s start.
+ * - START_TO_END:
+ * Let this point be the context object’s end. Let other point be
+ * sourceRange’s start.
+ * - END_TO_END:
+ * Let this point be the context object’s end. Let other point be
+ * sourceRange’s end.
+ * - END_TO_START:
+ * Let this point be the context object’s start. Let other point be
+ * sourceRange’s end.
+ */
+ var thisPoint;
+ var otherPoint;
+ switch (how) {
+ case interfaces_1.HowToCompare.StartToStart:
+ thisPoint = this._start;
+ otherPoint = sourceRange._start;
+ break;
+ case interfaces_1.HowToCompare.StartToEnd:
+ thisPoint = this._end;
+ otherPoint = sourceRange._start;
+ break;
+ case interfaces_1.HowToCompare.EndToEnd:
+ thisPoint = this._end;
+ otherPoint = sourceRange._end;
+ break;
+ case interfaces_1.HowToCompare.EndToStart:
+ thisPoint = this._start;
+ otherPoint = sourceRange._end;
+ break;
+ /* istanbul ignore next */
+ default:
+ throw new DOMException_1.NotSupportedError();
+ }
+ /**
+ * 4. If the position of this point relative to other point is
+ * - before
+ * Return −1.
+ * - equal
+ * Return 0.
+ * - after
+ * Return 1.
+ */
+ var position = algorithm_1.boundaryPoint_position(thisPoint, otherPoint);
+ if (position === interfaces_1.BoundaryPosition.Before) {
+ return -1;
+ }
+ else if (position === interfaces_1.BoundaryPosition.After) {
+ return 1;
+ }
+ else {
+ return 0;
+ }
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.deleteContents = function () {
+ var e_1, _a, e_2, _b;
+ /**
+ * 1. If the context object is collapsed, then return.
+ * 2. Let original start node, original start offset, original end node,
+ * and original end offset be the context object’s start node,
+ * start offset, end node, and end offset, respectively.
+ */
+ if (algorithm_1.range_collapsed(this))
+ return;
+ var originalStartNode = this._startNode;
+ var originalStartOffset = this._startOffset;
+ var originalEndNode = this._endNode;
+ var originalEndOffset = this._endOffset;
+ /**
+ * 3. If original start node and original end node are the same, and they
+ * are a Text, ProcessingInstruction, or Comment node, replace data with
+ * node original start node, offset original start offset, count original
+ * end offset minus original start offset, and data the empty string,
+ * and then return.
+ */
+ if (originalStartNode === originalEndNode &&
+ util_1.Guard.isCharacterDataNode(originalStartNode)) {
+ algorithm_1.characterData_replaceData(originalStartNode, originalStartOffset, originalEndOffset - originalStartOffset, '');
+ return;
+ }
+ /**
+ * 4. Let nodes to remove be a list of all the nodes that are contained in
+ * the context object, in tree order, omitting any node whose parent is also
+ * contained in the context object.
+ */
+ var nodesToRemove = [];
+ try {
+ for (var _c = __values(algorithm_1.range_getContainedNodes(this)), _d = _c.next(); !_d.done; _d = _c.next()) {
+ var node = _d.value;
+ var parent = node._parent;
+ if (parent !== null && algorithm_1.range_isContained(parent, this)) {
+ continue;
+ }
+ nodesToRemove.push(node);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ var newNode;
+ var newOffset;
+ if (algorithm_1.tree_isAncestorOf(originalEndNode, originalStartNode, true)) {
+ /**
+ * 5. If original start node is an inclusive ancestor of original end
+ * node, set new node to original start node and new offset to original
+ * start offset.
+ */
+ newNode = originalStartNode;
+ newOffset = originalStartOffset;
+ }
+ else {
+ /**
+ * 6. Otherwise:
+ * 6.1. Let reference node equal original start node.
+ * 6.2. While reference node’s parent is not null and is not an inclusive
+ * ancestor of original end node, set reference node to its parent.
+ * 6.3. Set new node to the parent of reference node, and new offset to
+ * one plus the index of reference node.
+ */
+ var referenceNode = originalStartNode;
+ while (referenceNode._parent !== null &&
+ !algorithm_1.tree_isAncestorOf(originalEndNode, referenceNode._parent, true)) {
+ referenceNode = referenceNode._parent;
+ }
+ /* istanbul ignore next */
+ if (referenceNode._parent === null) {
+ throw new Error("Parent node is null.");
+ }
+ newNode = referenceNode._parent;
+ newOffset = algorithm_1.tree_index(referenceNode) + 1;
+ }
+ /**
+ * 7. If original start node is a Text, ProcessingInstruction, or Comment
+ * node, replace data with node original start node, offset original start
+ * offset, count original start node’s length minus original start offset,
+ * data the empty string.
+ */
+ if (util_1.Guard.isCharacterDataNode(originalStartNode)) {
+ algorithm_1.characterData_replaceData(originalStartNode, originalStartOffset, algorithm_1.tree_nodeLength(originalStartNode) - originalStartOffset, '');
+ }
+ try {
+ /**
+ * 8. For each node in nodes to remove, in tree order, remove node from its
+ * parent.
+ */
+ for (var nodesToRemove_1 = __values(nodesToRemove), nodesToRemove_1_1 = nodesToRemove_1.next(); !nodesToRemove_1_1.done; nodesToRemove_1_1 = nodesToRemove_1.next()) {
+ var node = nodesToRemove_1_1.value;
+ /* istanbul ignore else */
+ if (node._parent) {
+ algorithm_1.mutation_remove(node, node._parent);
+ }
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (nodesToRemove_1_1 && !nodesToRemove_1_1.done && (_b = nodesToRemove_1.return)) _b.call(nodesToRemove_1);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ /**
+ * 9. If original end node is a Text, ProcessingInstruction, or Comment
+ * node, replace data with node original end node, offset 0, count original
+ * end offset and data the empty string.
+ */
+ if (util_1.Guard.isCharacterDataNode(originalEndNode)) {
+ algorithm_1.characterData_replaceData(originalEndNode, 0, originalEndOffset, '');
+ }
+ /**
+ * 10. Set start and end to (new node, new offset).
+ */
+ this._start = [newNode, newOffset];
+ this._end = [newNode, newOffset];
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.extractContents = function () {
+ /**
+ * The extractContents() method, when invoked, must return the result of
+ * extracting the context object.
+ */
+ return algorithm_1.range_extract(this);
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.cloneContents = function () {
+ /**
+ * The cloneContents() method, when invoked, must return the result of
+ * cloning the contents of the context object.
+ */
+ return algorithm_1.range_cloneTheContents(this);
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.insertNode = function (node) {
+ /**
+ * The insertNode(node) method, when invoked, must insert node into the
+ * context object.
+ */
+ return algorithm_1.range_insert(node, this);
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.surroundContents = function (newParent) {
+ var e_3, _a;
+ try {
+ /**
+ * 1. If a non-Text node is partially contained in the context object, then
+ * throw an "InvalidStateError" DOMException.
+ */
+ for (var _b = __values(algorithm_1.range_getPartiallyContainedNodes(this)), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var node = _c.value;
+ if (!util_1.Guard.isTextNode(node)) {
+ throw new DOMException_1.InvalidStateError();
+ }
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ /**
+ * 2. If newParent is a Document, DocumentType, or DocumentFragment node,
+ * then throw an "InvalidNodeTypeError" DOMException.
+ */
+ if (util_1.Guard.isDocumentNode(newParent) ||
+ util_1.Guard.isDocumentTypeNode(newParent) ||
+ util_1.Guard.isDocumentFragmentNode(newParent)) {
+ throw new DOMException_1.InvalidNodeTypeError();
+ }
+ /**
+ * 3. Let fragment be the result of extracting the context object.
+ */
+ var fragment = algorithm_1.range_extract(this);
+ /**
+ * 4. If newParent has children, then replace all with null within newParent.
+ */
+ if ((newParent)._children.size !== 0) {
+ algorithm_1.mutation_replaceAll(null, newParent);
+ }
+ /**
+ * 5. Insert newParent into the context object.
+ * 6. Append fragment to newParent.
+ */
+ algorithm_1.range_insert(newParent, this);
+ algorithm_1.mutation_append(fragment, newParent);
+ /**
+ * 7. Select newParent within the context object.
+ */
+ algorithm_1.range_select(newParent, this);
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.cloneRange = function () {
+ /**
+ * The cloneRange() method, when invoked, must return a new live range with
+ * the same start and end as the context object.
+ */
+ return algorithm_1.create_range(this._start, this._end);
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.detach = function () {
+ /**
+ * The detach() method, when invoked, must do nothing.
+ *
+ * since JS lacks weak references, we still use detach
+ */
+ DOMImpl_1.dom.rangeList.delete(this);
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.isPointInRange = function (node, offset) {
+ /**
+ * 1. If node’s root is different from the context object’s root, return false.
+ */
+ if (algorithm_1.tree_rootNode(node) !== algorithm_1.range_root(this)) {
+ return false;
+ }
+ /**
+ * 2. If node is a doctype, then throw an "InvalidNodeTypeError" DOMException.
+ * 3. If offset is greater than node’s length, then throw an
+ * "IndexSizeError" DOMException.
+ */
+ if (util_1.Guard.isDocumentTypeNode(node))
+ throw new DOMException_1.InvalidNodeTypeError();
+ if (offset > algorithm_1.tree_nodeLength(node))
+ throw new DOMException_1.IndexSizeError();
+ /**
+ * 4. If (node, offset) is before start or after end, return false.
+ */
+ var bp = [node, offset];
+ if (algorithm_1.boundaryPoint_position(bp, this._start) === interfaces_1.BoundaryPosition.Before ||
+ algorithm_1.boundaryPoint_position(bp, this._end) === interfaces_1.BoundaryPosition.After) {
+ return false;
+ }
+ /**
+ * 5. Return true.
+ */
+ return true;
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.comparePoint = function (node, offset) {
+ /**
+ * 1. If node’s root is different from the context object’s root, then throw
+ * a "WrongDocumentError" DOMException.
+ * 2. If node is a doctype, then throw an "InvalidNodeTypeError" DOMException.
+ * 3. If offset is greater than node’s length, then throw an
+ * "IndexSizeError" DOMException.
+ */
+ if (algorithm_1.tree_rootNode(node) !== algorithm_1.range_root(this))
+ throw new DOMException_1.WrongDocumentError();
+ if (util_1.Guard.isDocumentTypeNode(node))
+ throw new DOMException_1.InvalidNodeTypeError();
+ if (offset > algorithm_1.tree_nodeLength(node))
+ throw new DOMException_1.IndexSizeError();
+ /**
+ * 4. If (node, offset) is before start, return −1.
+ * 5. If (node, offset) is after end, return 1.
+ * 6. Return 0.
+ */
+ var bp = [node, offset];
+ if (algorithm_1.boundaryPoint_position(bp, this._start) === interfaces_1.BoundaryPosition.Before) {
+ return -1;
+ }
+ else if (algorithm_1.boundaryPoint_position(bp, this._end) === interfaces_1.BoundaryPosition.After) {
+ return 1;
+ }
+ else {
+ return 0;
+ }
+ };
+ /** @inheritdoc */
+ RangeImpl.prototype.intersectsNode = function (node) {
+ /**
+ * 1. If node’s root is different from the context object’s root, return false.
+ */
+ if (algorithm_1.tree_rootNode(node) !== algorithm_1.range_root(this)) {
+ return false;
+ }
+ /**
+ * 2. Let parent be node’s parent.
+ * 3. If parent is null, return true.
+ */
+ var parent = node._parent;
+ if (parent === null)
+ return true;
+ /**
+ * 4. Let offset be node’s index.
+ */
+ var offset = algorithm_1.tree_index(node);
+ /**
+ * 5. If (parent, offset) is before end and (parent, offset plus 1) is
+ * after start, return true.
+ */
+ if (algorithm_1.boundaryPoint_position([parent, offset], this._end) === interfaces_1.BoundaryPosition.Before &&
+ algorithm_1.boundaryPoint_position([parent, offset + 1], this._start) === interfaces_1.BoundaryPosition.After) {
+ return true;
+ }
+ /**
+ * 6. Return false.
+ */
+ return false;
+ };
+ RangeImpl.prototype.toString = function () {
+ var e_4, _a;
+ /**
+ * 1. Let s be the empty string.
+ */
+ var s = '';
+ /**
+ * 2. If the context object’s start node is the context object’s end node
+ * and it is a Text node, then return the substring of that Text node’s data
+ * beginning at the context object’s start offset and ending at the context
+ * object’s end offset.
+ */
+ if (this._startNode === this._endNode && util_1.Guard.isTextNode(this._startNode)) {
+ return this._startNode._data.substring(this._startOffset, this._endOffset);
+ }
+ /**
+ * 3. If the context object’s start node is a Text node, then append the
+ * substring of that node’s data from the context object’s start offset
+ * until the end to s.
+ */
+ if (util_1.Guard.isTextNode(this._startNode)) {
+ s += this._startNode._data.substring(this._startOffset);
+ }
+ try {
+ /**
+ * 4. Append the concatenation of the data of all Text nodes that are
+ * contained in the context object, in tree order, to s.
+ */
+ for (var _b = __values(algorithm_1.range_getContainedNodes(this)), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var child = _c.value;
+ if (util_1.Guard.isTextNode(child)) {
+ s += child._data;
+ }
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+ /**
+ * 5. If the context object’s end node is a Text node, then append the
+ * substring of that node’s data from its start until the context object’s
+ * end offset to s.
+ */
+ if (util_1.Guard.isTextNode(this._endNode)) {
+ s += this._endNode._data.substring(0, this._endOffset);
+ }
+ /**
+ * 6. Return s.
+ */
+ return s;
+ };
+ /**
+ * Creates a new `Range`.
+ *
+ * @param start - start point
+ * @param end - end point
+ */
+ RangeImpl._create = function (start, end) {
+ var range = new RangeImpl();
+ if (start)
+ range._start = start;
+ if (end)
+ range._end = end;
+ return range;
+ };
+ RangeImpl.START_TO_START = 0;
+ RangeImpl.START_TO_END = 1;
+ RangeImpl.END_TO_END = 2;
+ RangeImpl.END_TO_START = 3;
+ return RangeImpl;
+}(AbstractRangeImpl_1.AbstractRangeImpl));
+exports.RangeImpl = RangeImpl;
+/**
+ * Define constants on prototype.
+ */
+WebIDLAlgorithm_1.idl_defineConst(RangeImpl.prototype, "START_TO_START", 0);
+WebIDLAlgorithm_1.idl_defineConst(RangeImpl.prototype, "START_TO_END", 1);
+WebIDLAlgorithm_1.idl_defineConst(RangeImpl.prototype, "END_TO_END", 2);
+WebIDLAlgorithm_1.idl_defineConst(RangeImpl.prototype, "END_TO_START", 3);
+//# sourceMappingURL=RangeImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js.map
new file mode 100644
index 0000000..69d3e8e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"RangeImpl.js","sourceRoot":"","sources":["../../src/dom/RangeImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA+B;AAC/B,2CAGqB;AACrB,yDAAuD;AACvD,+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AAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;SACvD;QAED;;WAEG;QACH,OAAO,CAAC,CAAA;IACV,CAAC;IAED;;;;;OAKG;IACI,iBAAO,GAAd,UAAe,KAAqB,EAAE,GAAmB;QACvD,IAAM,KAAK,GAAG,IAAI,SAAS,EAAE,CAAA;QAC7B,IAAI,KAAK;YAAE,KAAK,CAAC,MAAM,GAAG,KAAK,CAAA;QAC/B,IAAI,GAAG;YAAE,KAAK,CAAC,IAAI,GAAG,GAAG,CAAA;QACzB,OAAO,KAAK,CAAA;IACd,CAAC;IA7mBM,wBAAc,GAAG,CAAC,CAAA;IAClB,sBAAY,GAAG,CAAC,CAAA;IAChB,oBAAU,GAAG,CAAC,CAAA;IACd,sBAAY,GAAG,CAAC,CAAA;IA2mBzB,gBAAC;CAAA,AAhnBD,CAA+B,qCAAiB,GAgnB/C;AAhnBY,8BAAS;AAknBtB;;GAEG;AACH,iCAAe,CAAC,SAAS,CAAC,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAA;AACzD,iCAAe,CAAC,SAAS,CAAC,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC,CAAA;AACvD,iCAAe,CAAC,SAAS,CAAC,SAAS,EAAE,YAAY,EAAE,CAAC,CAAC,CAAA;AACrD,iCAAe,CAAC,SAAS,CAAC,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.d.ts
new file mode 100644
index 0000000..feb5934
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.d.ts
@@ -0,0 +1,33 @@
+import { Element, ShadowRootMode, Event, EventTarget, ShadowRoot, Document } from "./interfaces";
+import { DocumentFragmentImpl } from "./DocumentFragmentImpl";
+/**
+ * Represents a shadow root.
+ */
+export declare class ShadowRootImpl extends DocumentFragmentImpl implements ShadowRoot {
+ _host: Element;
+ _mode: ShadowRootMode;
+ /**
+ * Initializes a new instance of `ShadowRoot`.
+ *
+ * @param host - shadow root's host element
+ * @param mode - shadow root's mode
+ */
+ private constructor();
+ /** @inheritdoc */
+ get mode(): ShadowRootMode;
+ /** @inheritdoc */
+ get host(): Element;
+ /**
+ * Gets the parent event target for the given event.
+ *
+ * @param event - an event
+ */
+ _getTheParent(event: Event): EventTarget | null;
+ /**
+ * Creates a new `ShadowRoot`.
+ *
+ * @param document - owner document
+ * @param host - shadow root's host element
+ */
+ static _create(document: Document, host: Element): ShadowRootImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js b/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js
new file mode 100644
index 0000000..a00163e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js
@@ -0,0 +1,82 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var DocumentFragmentImpl_1 = require("./DocumentFragmentImpl");
+var util_1 = require("@oozcitak/util");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents a shadow root.
+ */
+var ShadowRootImpl = /** @class */ (function (_super) {
+ __extends(ShadowRootImpl, _super);
+ /**
+ * Initializes a new instance of `ShadowRoot`.
+ *
+ * @param host - shadow root's host element
+ * @param mode - shadow root's mode
+ */
+ function ShadowRootImpl(host, mode) {
+ var _this = _super.call(this) || this;
+ _this._host = host;
+ _this._mode = mode;
+ return _this;
+ }
+ Object.defineProperty(ShadowRootImpl.prototype, "mode", {
+ /** @inheritdoc */
+ get: function () { return this._mode; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(ShadowRootImpl.prototype, "host", {
+ /** @inheritdoc */
+ get: function () { return this._host; },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Gets the parent event target for the given event.
+ *
+ * @param event - an event
+ */
+ ShadowRootImpl.prototype._getTheParent = function (event) {
+ /**
+ * A shadow root’s get the parent algorithm, given an event, returns null
+ * if event’s composed flag is unset and shadow root is the root of
+ * event’s path’s first struct’s invocation target, and shadow root’s host
+ * otherwise.
+ */
+ if (!event._composedFlag && !util_1.isEmpty(event._path) &&
+ algorithm_1.tree_rootNode(event._path[0].invocationTarget) === this) {
+ return null;
+ }
+ else {
+ return this._host;
+ }
+ };
+ // MIXIN: DocumentOrShadowRoot
+ // No elements
+ /**
+ * Creates a new `ShadowRoot`.
+ *
+ * @param document - owner document
+ * @param host - shadow root's host element
+ */
+ ShadowRootImpl._create = function (document, host) {
+ return new ShadowRootImpl(host, "closed");
+ };
+ return ShadowRootImpl;
+}(DocumentFragmentImpl_1.DocumentFragmentImpl));
+exports.ShadowRootImpl = ShadowRootImpl;
+//# sourceMappingURL=ShadowRootImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js.map
new file mode 100644
index 0000000..bc83c91
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ShadowRootImpl.js","sourceRoot":"","sources":["../../src/dom/ShadowRootImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA,+DAA6D;AAC7D,uCAAwC;AACxC,0CAA4C;AAE5C;;GAEG;AACH;IAAoC,kCAAoB;IAKtD;;;;;OAKG;IACH,wBAAoB,IAAa,EAAE,IAAoB;QAAvD,YACE,iBAAO,SAIR;QAFC,KAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,KAAI,CAAC,KAAK,GAAG,IAAI,CAAA;;IACnB,CAAC;IAGD,sBAAI,gCAAI;QADR,kBAAkB;aAClB,cAA6B,OAAO,IAAI,CAAC,KAAK,CAAA,CAAC,CAAC;;;OAAA;IAGhD,sBAAI,gCAAI;QADR,kBAAkB;aAClB,cAAsB,OAAO,IAAI,CAAC,KAAK,CAAA,CAAC,CAAC;;;OAAA;IAEzC;;;;OAIG;IACH,sCAAa,GAAb,UAAc,KAAY;QACxB;;;;;WAKG;QACH,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,cAAO,CAAC,KAAK,CAAC,KAAK,CAAC;YAC/C,yBAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,gBAAwB,CAAC,KAAK,IAAI,EAAE;YACjE,OAAO,IAAI,CAAA;SACZ;aAAM;YACL,OAAO,IAAI,CAAC,KAAK,CAAA;SAClB;IACH,CAAC;IAED,8BAA8B;IAC9B,cAAc;IAEd;;;;;OAKG;IACI,sBAAO,GAAd,UAAe,QAAkB,EAAE,IAAa;QAC9C,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;IAC3C,CAAC;IACH,qBAAC;AAAD,CAAC,AAxDD,CAAoC,2CAAoB,GAwDvD;AAxDY,wCAAc"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.d.ts
new file mode 100644
index 0000000..08fbfd6
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.d.ts
@@ -0,0 +1,16 @@
+import { Slotable, Slot, HTMLSlotElement } from "./interfaces";
+/**
+ * Represents a mixin that allows nodes to become the contents of
+ * a element. This mixin is implemented by {@link Element} and
+ * {@link Text}.
+ */
+export declare class SlotableImpl implements Slotable {
+ __name: string | undefined;
+ __assignedSlot: Slot | null | undefined;
+ get _name(): string;
+ set _name(val: string);
+ get _assignedSlot(): Slot | null;
+ set _assignedSlot(val: Slot | null);
+ /** @inheritdoc */
+ get assignedSlot(): HTMLSlotElement | null;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js b/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js
new file mode 100644
index 0000000..739dabe
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js
@@ -0,0 +1,35 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents a mixin that allows nodes to become the contents of
+ * a element. This mixin is implemented by {@link Element} and
+ * {@link Text}.
+ */
+var SlotableImpl = /** @class */ (function () {
+ function SlotableImpl() {
+ }
+ Object.defineProperty(SlotableImpl.prototype, "_name", {
+ get: function () { return this.__name || ''; },
+ set: function (val) { this.__name = val; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(SlotableImpl.prototype, "_assignedSlot", {
+ get: function () { return this.__assignedSlot || null; },
+ set: function (val) { this.__assignedSlot = val; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(SlotableImpl.prototype, "assignedSlot", {
+ /** @inheritdoc */
+ get: function () {
+ return algorithm_1.shadowTree_findASlot(this, true);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return SlotableImpl;
+}());
+exports.SlotableImpl = SlotableImpl;
+//# sourceMappingURL=SlotableImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js.map
new file mode 100644
index 0000000..679e2b7
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"SlotableImpl.js","sourceRoot":"","sources":["../../src/dom/SlotableImpl.ts"],"names":[],"mappings":";;AACA,0CAAmD;AAEnD;;;;GAIG;AACH;IAAA;IAgBA,CAAC;IAXC,sBAAI,+BAAK;aAAT,cAAsB,OAAO,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA,CAAC,CAAC;aAChD,UAAU,GAAW,IAAI,IAAI,CAAC,MAAM,GAAG,GAAG,CAAA,CAAC,CAAC;;;OADI;IAGhD,sBAAI,uCAAa;aAAjB,cAAmC,OAAO,IAAI,CAAC,cAAc,IAAI,IAAI,CAAA,CAAC,CAAC;aACvE,UAAkB,GAAgB,IAAI,IAAI,CAAC,cAAc,GAAG,GAAG,CAAA,CAAC,CAAC;;;OADM;IAIvE,sBAAI,sCAAY;QADhB,kBAAkB;aAClB;YACE,OAAO,gCAAoB,CAAC,IAAI,EAAE,IAAI,CAA2B,CAAA;QACnE,CAAC;;;OAAA;IAEH,mBAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,oCAAY"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.d.ts
new file mode 100644
index 0000000..c8de51b
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.d.ts
@@ -0,0 +1,13 @@
+import { AbstractRangeImpl } from "./AbstractRangeImpl";
+import { BoundaryPoint, StaticRangeInit, StaticRange } from "./interfaces";
+/**
+ * Represents a static range.
+ */
+export declare class StaticRangeImpl extends AbstractRangeImpl implements StaticRange {
+ _start: BoundaryPoint;
+ _end: BoundaryPoint;
+ /**
+ * Initializes a new instance of `StaticRange`.
+ */
+ constructor(init: StaticRangeInit);
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js b/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js
new file mode 100644
index 0000000..ff6162d
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js
@@ -0,0 +1,48 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var AbstractRangeImpl_1 = require("./AbstractRangeImpl");
+var DOMException_1 = require("./DOMException");
+var util_1 = require("../util");
+/**
+ * Represents a static range.
+ */
+var StaticRangeImpl = /** @class */ (function (_super) {
+ __extends(StaticRangeImpl, _super);
+ /**
+ * Initializes a new instance of `StaticRange`.
+ */
+ function StaticRangeImpl(init) {
+ var _this = _super.call(this) || this;
+ /**
+ * 1. If init’s startContainer or endContainer is a DocumentType or Attr
+ * node, then throw an "InvalidNodeTypeError" DOMException.
+ * 2. Let staticRange be a new StaticRange object.
+ * 3. Set staticRange’s start to (init’s startContainer, init’s startOffset)
+ * and end to (init’s endContainer, init’s endOffset).
+ * 4. Return staticRange.
+ */
+ if (util_1.Guard.isDocumentTypeNode(init.startContainer) || util_1.Guard.isAttrNode(init.startContainer) ||
+ util_1.Guard.isDocumentTypeNode(init.endContainer) || util_1.Guard.isAttrNode(init.endContainer)) {
+ throw new DOMException_1.InvalidNodeTypeError();
+ }
+ _this._start = [init.startContainer, init.startOffset];
+ _this._end = [init.endContainer, init.endOffset];
+ return _this;
+ }
+ return StaticRangeImpl;
+}(AbstractRangeImpl_1.AbstractRangeImpl));
+exports.StaticRangeImpl = StaticRangeImpl;
+//# sourceMappingURL=StaticRangeImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js.map
new file mode 100644
index 0000000..699cd3a
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"StaticRangeImpl.js","sourceRoot":"","sources":["../../src/dom/StaticRangeImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yDAAuD;AACvD,+CAAqD;AAErD,gCAA+B;AAE/B;;GAEG;AACH;IAAqC,mCAAiB;IAKpD;;OAEG;IACH,yBAAY,IAAqB;QAAjC,YACE,iBAAO,SAeR;QAdC;;;;;;;WAOG;QACH,IAAI,YAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,YAAK,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC;YACxF,YAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,YAAK,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE;YACpF,MAAM,IAAI,mCAAoB,EAAE,CAAA;SACjC;QACD,KAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;QACrD,KAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;;IACjD,CAAC;IAEH,sBAAC;AAAD,CAAC,AA1BD,CAAqC,qCAAiB,GA0BrD;AA1BY,0CAAe"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/TextImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/TextImpl.d.ts
new file mode 100644
index 0000000..925ee1a
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/TextImpl.d.ts
@@ -0,0 +1,28 @@
+import { NodeType, Text, HTMLSlotElement, Document, Slot } from "./interfaces";
+import { CharacterDataImpl } from "./CharacterDataImpl";
+/**
+ * Represents a text node.
+ */
+export declare class TextImpl extends CharacterDataImpl implements Text {
+ _nodeType: NodeType;
+ _name: string;
+ _assignedSlot: Slot | null;
+ /**
+ * Initializes a new instance of `Text`.
+ *
+ * @param data - the text content
+ */
+ constructor(data?: string);
+ /** @inheritdoc */
+ get wholeText(): string;
+ /** @inheritdoc */
+ splitText(offset: number): Text;
+ get assignedSlot(): HTMLSlotElement | null;
+ /**
+ * Creates a `Text`.
+ *
+ * @param document - owner document
+ * @param data - the text content
+ */
+ static _create(document: Document, data?: string): TextImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/TextImpl.js b/node_modules/@oozcitak/dom/lib/dom/TextImpl.js
new file mode 100644
index 0000000..134b2d6
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/TextImpl.js
@@ -0,0 +1,109 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("./interfaces");
+var CharacterDataImpl_1 = require("./CharacterDataImpl");
+var algorithm_1 = require("../algorithm");
+var WebIDLAlgorithm_1 = require("../algorithm/WebIDLAlgorithm");
+/**
+ * Represents a text node.
+ */
+var TextImpl = /** @class */ (function (_super) {
+ __extends(TextImpl, _super);
+ /**
+ * Initializes a new instance of `Text`.
+ *
+ * @param data - the text content
+ */
+ function TextImpl(data) {
+ if (data === void 0) { data = ''; }
+ var _this = _super.call(this, data) || this;
+ _this._name = '';
+ _this._assignedSlot = null;
+ return _this;
+ }
+ Object.defineProperty(TextImpl.prototype, "wholeText", {
+ /** @inheritdoc */
+ get: function () {
+ var e_1, _a;
+ /**
+ * The wholeText attribute’s getter must return the concatenation of the
+ * data of the contiguous Text nodes of the context object, in tree order.
+ */
+ var text = '';
+ try {
+ for (var _b = __values(algorithm_1.text_contiguousTextNodes(this, true)), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var node = _c.value;
+ text = text + node._data;
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ return text;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ TextImpl.prototype.splitText = function (offset) {
+ /**
+ * The splitText(offset) method, when invoked, must split context object
+ * with offset offset.
+ */
+ return algorithm_1.text_split(this, offset);
+ };
+ Object.defineProperty(TextImpl.prototype, "assignedSlot", {
+ // MIXIN: Slotable
+ /* istanbul ignore next */
+ get: function () { throw new Error("Mixin: Slotable not implemented."); },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Creates a `Text`.
+ *
+ * @param document - owner document
+ * @param data - the text content
+ */
+ TextImpl._create = function (document, data) {
+ if (data === void 0) { data = ''; }
+ var node = new TextImpl(data);
+ node._nodeDocument = document;
+ return node;
+ };
+ return TextImpl;
+}(CharacterDataImpl_1.CharacterDataImpl));
+exports.TextImpl = TextImpl;
+/**
+ * Initialize prototype properties
+ */
+WebIDLAlgorithm_1.idl_defineConst(TextImpl.prototype, "_nodeType", interfaces_1.NodeType.Text);
+//# sourceMappingURL=TextImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/TextImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/TextImpl.js.map
new file mode 100644
index 0000000..c899de1
--- /dev/null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,CAAC;IAEH,eAAC;AAAD,CAAC,AAxDD,CAA8B,qCAAiB,GAwD9C;AAxDY,4BAAQ;AA0DrB;;GAEG;AACH,iCAAe,CAAC,QAAQ,CAAC,SAAS,EAAE,WAAW,EAAE,qBAAQ,CAAC,IAAI,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.d.ts
new file mode 100644
index 0000000..255a5e8
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.d.ts
@@ -0,0 +1,23 @@
+import { Node, NodeFilter, WhatToShow, Traverser } from "./interfaces";
+/**
+ * Represents an object which can be used to iterate through the nodes
+ * of a subtree.
+ */
+export declare abstract class TraverserImpl implements Traverser {
+ _activeFlag: boolean;
+ _root: Node;
+ _whatToShow: WhatToShow;
+ _filter: NodeFilter | null;
+ /**
+ * Initializes a new instance of `Traverser`.
+ *
+ * @param root - root node
+ */
+ protected constructor(root: Node);
+ /** @inheritdoc */
+ get root(): Node;
+ /** @inheritdoc */
+ get whatToShow(): WhatToShow;
+ /** @inheritdoc */
+ get filter(): NodeFilter | null;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js b/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js
new file mode 100644
index 0000000..5241cbd
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js
@@ -0,0 +1,41 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("./interfaces");
+/**
+ * Represents an object which can be used to iterate through the nodes
+ * of a subtree.
+ */
+var TraverserImpl = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `Traverser`.
+ *
+ * @param root - root node
+ */
+ function TraverserImpl(root) {
+ this._activeFlag = false;
+ this._root = root;
+ this._whatToShow = interfaces_1.WhatToShow.All;
+ this._filter = null;
+ }
+ Object.defineProperty(TraverserImpl.prototype, "root", {
+ /** @inheritdoc */
+ get: function () { return this._root; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(TraverserImpl.prototype, "whatToShow", {
+ /** @inheritdoc */
+ get: function () { return this._whatToShow; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(TraverserImpl.prototype, "filter", {
+ /** @inheritdoc */
+ get: function () { return this._filter; },
+ enumerable: true,
+ configurable: true
+ });
+ return TraverserImpl;
+}());
+exports.TraverserImpl = TraverserImpl;
+//# sourceMappingURL=TraverserImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js.map
new file mode 100644
index 0000000..91352ec
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"TraverserImpl.js","sourceRoot":"","sources":["../../src/dom/TraverserImpl.ts"],"names":[],"mappings":";;AAAA,2CAAsE;AAEtE;;;GAGG;AACH;IAOE;;;;OAIG;IACH,uBAAsB,IAAU;QAC9B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAA;QACxB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,IAAI,CAAC,WAAW,GAAG,uBAAU,CAAC,GAAG,CAAA;QACjC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;IACrB,CAAC;IAGD,sBAAI,+BAAI;QADR,kBAAkB;aAClB,cAAmB,OAAO,IAAI,CAAC,KAAK,CAAA,CAAC,CAAC;;;OAAA;IAGtC,sBAAI,qCAAU;QADd,kBAAkB;aAClB,cAA+B,OAAO,IAAI,CAAC,WAAW,CAAA,CAAC,CAAC;;;OAAA;IAGxD,sBAAI,iCAAM;QADV,kBAAkB;aAClB,cAAkC,OAAO,IAAI,CAAC,OAAO,CAAA,CAAC,CAAC;;;OAAA;IAEzD,oBAAC;AAAD,CAAC,AA5BD,IA4BC;AA5BqB,sCAAa"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.d.ts
new file mode 100644
index 0000000..1b9fc32
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.d.ts
@@ -0,0 +1,36 @@
+import { Node, TreeWalker } from "./interfaces";
+import { TraverserImpl } from "./TraverserImpl";
+/**
+ * Represents the nodes of a subtree and a position within them.
+ */
+export declare class TreeWalkerImpl extends TraverserImpl implements TreeWalker {
+ _current: Node;
+ /**
+ * Initializes a new instance of `TreeWalker`.
+ */
+ private constructor();
+ /** @inheritdoc */
+ get currentNode(): Node;
+ set currentNode(value: Node);
+ /** @inheritdoc */
+ parentNode(): Node | null;
+ /** @inheritdoc */
+ firstChild(): Node | null;
+ /** @inheritdoc */
+ lastChild(): Node | null;
+ /** @inheritdoc */
+ nextSibling(): Node | null;
+ /** @inheritdoc */
+ previousNode(): Node | null;
+ /** @inheritdoc */
+ previousSibling(): Node | null;
+ /** @inheritdoc */
+ nextNode(): Node | null;
+ /**
+ * Creates a new `TreeWalker`.
+ *
+ * @param root - iterator's root node
+ * @param current - current node
+ */
+ static _create(root: Node, current: Node): TreeWalkerImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js b/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js
new file mode 100644
index 0000000..8bed3c9
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js
@@ -0,0 +1,249 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("./interfaces");
+var TraverserImpl_1 = require("./TraverserImpl");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents the nodes of a subtree and a position within them.
+ */
+var TreeWalkerImpl = /** @class */ (function (_super) {
+ __extends(TreeWalkerImpl, _super);
+ /**
+ * Initializes a new instance of `TreeWalker`.
+ */
+ function TreeWalkerImpl(root, current) {
+ var _this = _super.call(this, root) || this;
+ _this._current = current;
+ return _this;
+ }
+ Object.defineProperty(TreeWalkerImpl.prototype, "currentNode", {
+ /** @inheritdoc */
+ get: function () { return this._current; },
+ set: function (value) { this._current = value; },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ TreeWalkerImpl.prototype.parentNode = function () {
+ /**
+ * 1. Let node be the context object’s current.
+ * 2. While node is non-null and is not the context object’s root:
+ */
+ var node = this._current;
+ while (node !== null && node !== this._root) {
+ /**
+ * 2.1. Set node to node’s parent.
+ * 2.2. If node is non-null and filtering node within the context object
+ * returns FILTER_ACCEPT, then set the context object’s current to node
+ * and return node.
+ */
+ node = node._parent;
+ if (node !== null &&
+ algorithm_1.traversal_filter(this, node) === interfaces_1.FilterResult.Accept) {
+ this._current = node;
+ return node;
+ }
+ }
+ /**
+ * 3. Return null.
+ */
+ return null;
+ };
+ /** @inheritdoc */
+ TreeWalkerImpl.prototype.firstChild = function () {
+ /**
+ * The firstChild() method, when invoked, must traverse children with the
+ * context object and first.
+ */
+ return algorithm_1.treeWalker_traverseChildren(this, true);
+ };
+ /** @inheritdoc */
+ TreeWalkerImpl.prototype.lastChild = function () {
+ /**
+ * The lastChild() method, when invoked, must traverse children with the
+ * context object and last.
+ */
+ return algorithm_1.treeWalker_traverseChildren(this, false);
+ };
+ /** @inheritdoc */
+ TreeWalkerImpl.prototype.nextSibling = function () {
+ /**
+ * The nextSibling() method, when invoked, must traverse siblings with the
+ * context object and next.
+ */
+ return algorithm_1.treeWalker_traverseSiblings(this, true);
+ };
+ /** @inheritdoc */
+ TreeWalkerImpl.prototype.previousNode = function () {
+ /**
+ * 1. Let node be the context object’s current.
+ * 2. While node is not the context object’s root:
+ */
+ var node = this._current;
+ while (node !== this._root) {
+ /**
+ * 2.1. Let sibling be node’s previous sibling.
+ * 2.2. While sibling is non-null:
+ */
+ var sibling = node._previousSibling;
+ while (sibling) {
+ /**
+ * 2.2.1. Set node to sibling.
+ * 2.2.2. Let result be the result of filtering node within the context
+ * object.
+ */
+ node = sibling;
+ var result = algorithm_1.traversal_filter(this, node);
+ /**
+ * 2.2.3. While result is not FILTER_REJECT and node has a child:
+ */
+ while (result !== interfaces_1.FilterResult.Reject && node._lastChild) {
+ /**
+ * 2.2.3.1. Set node to node’s last child.
+ * 2.2.3.2. Set result to the result of filtering node within the
+ * context object.
+ */
+ node = node._lastChild;
+ result = algorithm_1.traversal_filter(this, node);
+ }
+ /**
+ * 2.2.4. If result is FILTER_ACCEPT, then set the context object’s
+ * current to node and return node.
+ */
+ if (result === interfaces_1.FilterResult.Accept) {
+ this._current = node;
+ return node;
+ }
+ /**
+ * 2.2.5. Set sibling to node’s previous sibling.
+ */
+ sibling = node._previousSibling;
+ }
+ /**
+ * 2.3. If node is the context object’s root or node’s parent is null,
+ * then return null.
+ */
+ if (node === this._root || node._parent === null) {
+ return null;
+ }
+ /**
+ * 2.4. Set node to node’s parent.
+ */
+ node = node._parent;
+ /**
+ * 2.5. If the return value of filtering node within the context object is
+ * FILTER_ACCEPT, then set the context object’s current to node and
+ * return node.
+ */
+ if (algorithm_1.traversal_filter(this, node) === interfaces_1.FilterResult.Accept) {
+ this._current = node;
+ return node;
+ }
+ }
+ /**
+ * 3. Return null.
+ */
+ return null;
+ };
+ /** @inheritdoc */
+ TreeWalkerImpl.prototype.previousSibling = function () {
+ /**
+ * The previousSibling() method, when invoked, must traverse siblings with
+ * the context object and previous.
+ */
+ return algorithm_1.treeWalker_traverseSiblings(this, false);
+ };
+ /** @inheritdoc */
+ TreeWalkerImpl.prototype.nextNode = function () {
+ /**
+ * 1. Let node be the context object’s current.
+ * 2. Let result be FILTER_ACCEPT.
+ * 3. While true:
+ */
+ var node = this._current;
+ var result = interfaces_1.FilterResult.Accept;
+ while (true) {
+ /**
+ * 3.1. While result is not FILTER_REJECT and node has a child:
+ */
+ while (result !== interfaces_1.FilterResult.Reject && node._firstChild) {
+ /**
+ * 3.1.1. Set node to its first child.
+ * 3.1.2. Set result to the result of filtering node within the context
+ * object.
+ * 3.1.3. If result is FILTER_ACCEPT, then set the context object’s
+ * current to node and return node.
+ */
+ node = node._firstChild;
+ result = algorithm_1.traversal_filter(this, node);
+ if (result === interfaces_1.FilterResult.Accept) {
+ this._current = node;
+ return node;
+ }
+ }
+ /**
+ * 3.2. Let sibling be null.
+ * 3.3. Let temporary be node.
+ * 3.4. While temporary is non-null:
+ */
+ var sibling = null;
+ var temporary = node;
+ while (temporary !== null) {
+ /**
+ * 3.4.1. If temporary is the context object’s root, then return null.
+ */
+ if (temporary === this._root) {
+ return null;
+ }
+ /**
+ * 3.4.2. Set sibling to temporary’s next sibling.
+ * 3.4.3. If sibling is non-null, then break.
+ */
+ sibling = temporary._nextSibling;
+ if (sibling !== null) {
+ node = sibling;
+ break;
+ }
+ /**
+ * 3.4.4. Set temporary to temporary’s parent.
+ */
+ temporary = temporary._parent;
+ }
+ /**
+ * 3.5. Set result to the result of filtering node within the context object.
+ * 3.6. If result is FILTER_ACCEPT, then set the context object’s current
+ * to node and return node.
+ */
+ result = algorithm_1.traversal_filter(this, node);
+ if (result === interfaces_1.FilterResult.Accept) {
+ this._current = node;
+ return node;
+ }
+ }
+ };
+ /**
+ * Creates a new `TreeWalker`.
+ *
+ * @param root - iterator's root node
+ * @param current - current node
+ */
+ TreeWalkerImpl._create = function (root, current) {
+ return new TreeWalkerImpl(root, current);
+ };
+ return TreeWalkerImpl;
+}(TraverserImpl_1.TraverserImpl));
+exports.TreeWalkerImpl = TreeWalkerImpl;
+//# sourceMappingURL=TreeWalkerImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js.map
new file mode 100644
index 0000000..cd53ba4
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"TreeWalkerImpl.js","sourceRoot":"","sources":["../../src/dom/TreeWalkerImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA6D;AAC7D,iDAA+C;AAC/C,0CAEqB;AAErB;;GAEG;AACH;IAAoC,kCAAa;IAI/C;;OAEG;IACH,wBAAoB,IAAU,EAAE,OAAa;QAA7C,YACE,kBAAM,IAAI,CAAC,SAGZ;QADC,KAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;;IACzB,CAAC;IAGD,sBAAI,uCAAW;QADf,kBAAkB;aAClB,cAA0B,OAAO,IAAI,CAAC,QAAQ,CAAA,CAAC,CAAC;aAChD,UAAgB,KAAW,IAAI,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAA,CAAC,CAAC;;;OADN;IAGhD,kBAAkB;IAClB,mCAAU,GAAV;QACE;;;WAGG;QACH,IAAI,IAAI,GAAgB,IAAI,CAAC,QAAQ,CAAA;QACrC,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,IAAI,CAAC,KAAK,EAAE;YAC3C;;;;;eAKG;YACH,IAAI,GAAG,IAAI,CAAC,OAAO,CAAA;YACnB,IAAI,IAAI,KAAK,IAAI;gBACf,4BAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,yBAAY,CAAC,MAAM,EAAE;gBACtD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;gBACpB,OAAO,IAAI,CAAA;aACZ;SACF;QAED;;WAEG;QACH,OAAO,IAAI,CAAA;IACb,CAAC;IAED,kBAAkB;IAClB,mCAAU,GAAV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AA;oBACd,MAAK;iBACN;gBACD;;mBAEG;gBACH,SAAS,GAAG,SAAS,CAAC,OAAO,CAAA;aAC9B;YAED;;;;eAIG;YACH,MAAM,GAAG,4BAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;YACrC,IAAI,MAAM,KAAK,yBAAY,CAAC,MAAM,EAAE;gBAClC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;gBACpB,OAAO,IAAI,CAAA;aACZ;SACF;IACH,CAAC;IAED;;;;;OAKG;IACI,sBAAO,GAAd,UAAe,IAAU,EAAE,OAAa;QACtC,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC1C,CAAC;IAEH,qBAAC;AAAD,CAAC,AApPD,CAAoC,6BAAa,GAoPhD;AApPY,wCAAc"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/WindowImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/WindowImpl.d.ts
new file mode 100644
index 0000000..ee02095
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/WindowImpl.d.ts
@@ -0,0 +1,26 @@
+import { Event, Slot, MutationObserver, Document, Window, NodeIterator } from "./interfaces";
+import { EventTargetImpl } from "./EventTargetImpl";
+import { FixedSizeSet } from "@oozcitak/util";
+/**
+ * Represents a window containing a DOM document.
+ */
+export declare class WindowImpl extends EventTargetImpl implements Window {
+ _currentEvent?: Event;
+ _signalSlots: Set;
+ _mutationObserverMicrotaskQueued: boolean;
+ _mutationObservers: Set;
+ _associatedDocument: Document;
+ _iteratorList: FixedSizeSet;
+ /**
+ * Initializes a new instance of `Window`.
+ */
+ protected constructor();
+ /** @inheritdoc */
+ get document(): Document;
+ /** @inheritdoc */
+ get event(): Event | undefined;
+ /**
+ * Creates a new window with a blank document.
+ */
+ static _create(): WindowImpl;
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js b/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js
new file mode 100644
index 0000000..6bd8603
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js
@@ -0,0 +1,57 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var EventTargetImpl_1 = require("./EventTargetImpl");
+var util_1 = require("@oozcitak/util");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents a window containing a DOM document.
+ */
+var WindowImpl = /** @class */ (function (_super) {
+ __extends(WindowImpl, _super);
+ /**
+ * Initializes a new instance of `Window`.
+ */
+ function WindowImpl() {
+ var _this = _super.call(this) || this;
+ _this._signalSlots = new Set();
+ _this._mutationObserverMicrotaskQueued = false;
+ _this._mutationObservers = new Set();
+ _this._iteratorList = new util_1.FixedSizeSet();
+ _this._associatedDocument = algorithm_1.create_document();
+ return _this;
+ }
+ Object.defineProperty(WindowImpl.prototype, "document", {
+ /** @inheritdoc */
+ get: function () { return this._associatedDocument; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(WindowImpl.prototype, "event", {
+ /** @inheritdoc */
+ get: function () { return this._currentEvent; },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Creates a new window with a blank document.
+ */
+ WindowImpl._create = function () {
+ return new WindowImpl();
+ };
+ return WindowImpl;
+}(EventTargetImpl_1.EventTargetImpl));
+exports.WindowImpl = WindowImpl;
+//# sourceMappingURL=WindowImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js.map
new file mode 100644
index 0000000..45415dd
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"WindowImpl.js","sourceRoot":"","sources":["../../src/dom/WindowImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA,qDAAmD;AACnD,uCAA6C;AAC7C,0CAA8C;AAE9C;;GAEG;AACH;IAAgC,8BAAe;IAW7C;;OAEG;IACH;QAAA,YACE,iBAAO,SAGR;QAfD,kBAAY,GAAG,IAAI,GAAG,EAAQ,CAAA;QAC9B,sCAAgC,GAAY,KAAK,CAAA;QACjD,wBAAkB,GAAG,IAAI,GAAG,EAAoB,CAAA;QAIhD,mBAAa,GAAG,IAAI,mBAAY,EAAgB,CAAA;QAQ9C,KAAI,CAAC,mBAAmB,GAAG,2BAAe,EAAE,CAAA;;IAC9C,CAAC;IAGD,sBAAI,gCAAQ;QADZ,kBAAkB;aAClB,cAA2B,OAAO,IAAI,CAAC,mBAAmB,CAAA,CAAC,CAAC;;;OAAA;IAG5D,sBAAI,6BAAK;QADT,kBAAkB;aAClB,cAAiC,OAAO,IAAI,CAAC,aAAa,CAAA,CAAC,CAAC;;;OAAA;IAE5D;;OAEG;IACI,kBAAO,GAAd;QACE,OAAO,IAAI,UAAU,EAAE,CAAA;IACzB,CAAC;IACH,iBAAC;AAAD,CAAC,AAhCD,CAAgC,iCAAe,GAgC9C;AAhCY,gCAAU"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.d.ts b/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.d.ts
new file mode 100644
index 0000000..4f1a9b6
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.d.ts
@@ -0,0 +1,11 @@
+import { DocumentImpl } from "./DocumentImpl";
+import { XMLDocument } from "./interfaces";
+/**
+ * Represents an XML document.
+ */
+export declare class XMLDocumentImpl extends DocumentImpl implements XMLDocument {
+ /**
+ * Initializes a new instance of `XMLDocument`.
+ */
+ constructor();
+}
diff --git a/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js b/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js
new file mode 100644
index 0000000..93fd6a4
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js
@@ -0,0 +1,31 @@
+"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var DocumentImpl_1 = require("./DocumentImpl");
+/**
+ * Represents an XML document.
+ */
+var XMLDocumentImpl = /** @class */ (function (_super) {
+ __extends(XMLDocumentImpl, _super);
+ /**
+ * Initializes a new instance of `XMLDocument`.
+ */
+ function XMLDocumentImpl() {
+ return _super.call(this) || this;
+ }
+ return XMLDocumentImpl;
+}(DocumentImpl_1.DocumentImpl));
+exports.XMLDocumentImpl = XMLDocumentImpl;
+//# sourceMappingURL=XMLDocumentImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js.map b/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js.map
new file mode 100644
index 0000000..485e008
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"XMLDocumentImpl.js","sourceRoot":"","sources":["../../src/dom/XMLDocumentImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA6C;AAG7C;;GAEG;AACH;IAAqC,mCAAY;IAE/C;;OAEG;IACH;eACE,iBAAO;IACT,CAAC;IACH,sBAAC;AAAD,CAAC,AARD,CAAqC,2BAAY,GAQhD;AARY,0CAAe"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/index.d.ts b/node_modules/@oozcitak/dom/lib/dom/index.d.ts
new file mode 100644
index 0000000..a7b945a
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/index.d.ts
@@ -0,0 +1,36 @@
+import { AbortControllerImpl } from "./AbortControllerImpl";
+import { AbortSignalImpl } from "./AbortSignalImpl";
+import { AbstractRangeImpl } from "./AbstractRangeImpl";
+import { AttrImpl } from "./AttrImpl";
+import { CDATASectionImpl } from "./CDATASectionImpl";
+import { CharacterDataImpl } from "./CharacterDataImpl";
+import { CommentImpl } from "./CommentImpl";
+import { CustomEventImpl } from "./CustomEventImpl";
+import { DocumentFragmentImpl } from "./DocumentFragmentImpl";
+import { DocumentImpl } from "./DocumentImpl";
+import { DocumentTypeImpl } from "./DocumentTypeImpl";
+import { dom } from "./DOMImpl";
+import { DOMImplementationImpl } from "./DOMImplementationImpl";
+import { DOMTokenListImpl } from "./DOMTokenListImpl";
+import { ElementImpl } from "./ElementImpl";
+import { EventImpl } from "./EventImpl";
+import { EventTargetImpl } from "./EventTargetImpl";
+import { HTMLCollectionImpl } from "./HTMLCollectionImpl";
+import { MutationObserverImpl } from "./MutationObserverImpl";
+import { MutationRecordImpl } from "./MutationRecordImpl";
+import { NamedNodeMapImpl } from "./NamedNodeMapImpl";
+import { NodeFilterImpl } from "./NodeFilterImpl";
+import { NodeImpl } from "./NodeImpl";
+import { NodeIteratorImpl } from "./NodeIteratorImpl";
+import { NodeListImpl } from "./NodeListImpl";
+import { NodeListStaticImpl } from "./NodeListStaticImpl";
+import { ProcessingInstructionImpl } from "./ProcessingInstructionImpl";
+import { RangeImpl } from "./RangeImpl";
+import { ShadowRootImpl } from "./ShadowRootImpl";
+import { StaticRangeImpl } from "./StaticRangeImpl";
+import { TextImpl } from "./TextImpl";
+import { TraverserImpl } from "./TraverserImpl";
+import { TreeWalkerImpl } from "./TreeWalkerImpl";
+import { WindowImpl } from "./WindowImpl";
+import { XMLDocumentImpl } from "./XMLDocumentImpl";
+export { AbortControllerImpl as AbortController, AbortSignalImpl as AbortSignal, AbstractRangeImpl as AbstractRange, AttrImpl as Attr, CDATASectionImpl as CDATASection, CharacterDataImpl as CharacterData, CommentImpl as Comment, CustomEventImpl as CustomEvent, DocumentFragmentImpl as DocumentFragment, DocumentImpl as Document, DocumentTypeImpl as DocumentType, dom, DOMImplementationImpl as DOMImplementation, DOMTokenListImpl as DOMTokenList, ElementImpl as Element, EventImpl as Event, EventTargetImpl as EventTarget, HTMLCollectionImpl as HTMLCollection, MutationObserverImpl as MutationObserver, MutationRecordImpl as MutationRecord, NamedNodeMapImpl as NamedNodeMap, NodeFilterImpl as NodeFilter, NodeImpl as Node, NodeIteratorImpl as NodeIterator, NodeListImpl as NodeList, NodeListStaticImpl as NodeListStatic, ProcessingInstructionImpl as ProcessingInstruction, RangeImpl as Range, ShadowRootImpl as ShadowRoot, StaticRangeImpl as StaticRange, TextImpl as Text, TraverserImpl as Traverser, TreeWalkerImpl as TreeWalker, WindowImpl as Window, XMLDocumentImpl as XMLDocument };
diff --git a/node_modules/@oozcitak/dom/lib/dom/index.js b/node_modules/@oozcitak/dom/lib/dom/index.js
new file mode 100644
index 0000000..7146be4
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/index.js
@@ -0,0 +1,102 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("@oozcitak/util");
+// Import implementation classes
+var AbortControllerImpl_1 = require("./AbortControllerImpl");
+exports.AbortController = AbortControllerImpl_1.AbortControllerImpl;
+var AbortSignalImpl_1 = require("./AbortSignalImpl");
+exports.AbortSignal = AbortSignalImpl_1.AbortSignalImpl;
+var AbstractRangeImpl_1 = require("./AbstractRangeImpl");
+exports.AbstractRange = AbstractRangeImpl_1.AbstractRangeImpl;
+var AttrImpl_1 = require("./AttrImpl");
+exports.Attr = AttrImpl_1.AttrImpl;
+var CDATASectionImpl_1 = require("./CDATASectionImpl");
+exports.CDATASection = CDATASectionImpl_1.CDATASectionImpl;
+var CharacterDataImpl_1 = require("./CharacterDataImpl");
+exports.CharacterData = CharacterDataImpl_1.CharacterDataImpl;
+var ChildNodeImpl_1 = require("./ChildNodeImpl");
+var CommentImpl_1 = require("./CommentImpl");
+exports.Comment = CommentImpl_1.CommentImpl;
+var CustomEventImpl_1 = require("./CustomEventImpl");
+exports.CustomEvent = CustomEventImpl_1.CustomEventImpl;
+var DocumentFragmentImpl_1 = require("./DocumentFragmentImpl");
+exports.DocumentFragment = DocumentFragmentImpl_1.DocumentFragmentImpl;
+var DocumentImpl_1 = require("./DocumentImpl");
+exports.Document = DocumentImpl_1.DocumentImpl;
+var DocumentOrShadowRootImpl_1 = require("./DocumentOrShadowRootImpl");
+var DocumentTypeImpl_1 = require("./DocumentTypeImpl");
+exports.DocumentType = DocumentTypeImpl_1.DocumentTypeImpl;
+var DOMImpl_1 = require("./DOMImpl");
+exports.dom = DOMImpl_1.dom;
+var DOMImplementationImpl_1 = require("./DOMImplementationImpl");
+exports.DOMImplementation = DOMImplementationImpl_1.DOMImplementationImpl;
+var DOMTokenListImpl_1 = require("./DOMTokenListImpl");
+exports.DOMTokenList = DOMTokenListImpl_1.DOMTokenListImpl;
+var ElementImpl_1 = require("./ElementImpl");
+exports.Element = ElementImpl_1.ElementImpl;
+var EventImpl_1 = require("./EventImpl");
+exports.Event = EventImpl_1.EventImpl;
+var EventTargetImpl_1 = require("./EventTargetImpl");
+exports.EventTarget = EventTargetImpl_1.EventTargetImpl;
+var HTMLCollectionImpl_1 = require("./HTMLCollectionImpl");
+exports.HTMLCollection = HTMLCollectionImpl_1.HTMLCollectionImpl;
+var MutationObserverImpl_1 = require("./MutationObserverImpl");
+exports.MutationObserver = MutationObserverImpl_1.MutationObserverImpl;
+var MutationRecordImpl_1 = require("./MutationRecordImpl");
+exports.MutationRecord = MutationRecordImpl_1.MutationRecordImpl;
+var NamedNodeMapImpl_1 = require("./NamedNodeMapImpl");
+exports.NamedNodeMap = NamedNodeMapImpl_1.NamedNodeMapImpl;
+var NodeFilterImpl_1 = require("./NodeFilterImpl");
+exports.NodeFilter = NodeFilterImpl_1.NodeFilterImpl;
+var NodeImpl_1 = require("./NodeImpl");
+exports.Node = NodeImpl_1.NodeImpl;
+var NodeIteratorImpl_1 = require("./NodeIteratorImpl");
+exports.NodeIterator = NodeIteratorImpl_1.NodeIteratorImpl;
+var NodeListImpl_1 = require("./NodeListImpl");
+exports.NodeList = NodeListImpl_1.NodeListImpl;
+var NodeListStaticImpl_1 = require("./NodeListStaticImpl");
+exports.NodeListStatic = NodeListStaticImpl_1.NodeListStaticImpl;
+var NonDocumentTypeChildNodeImpl_1 = require("./NonDocumentTypeChildNodeImpl");
+var NonElementParentNodeImpl_1 = require("./NonElementParentNodeImpl");
+var ParentNodeImpl_1 = require("./ParentNodeImpl");
+var ProcessingInstructionImpl_1 = require("./ProcessingInstructionImpl");
+exports.ProcessingInstruction = ProcessingInstructionImpl_1.ProcessingInstructionImpl;
+var RangeImpl_1 = require("./RangeImpl");
+exports.Range = RangeImpl_1.RangeImpl;
+var ShadowRootImpl_1 = require("./ShadowRootImpl");
+exports.ShadowRoot = ShadowRootImpl_1.ShadowRootImpl;
+var SlotableImpl_1 = require("./SlotableImpl");
+var StaticRangeImpl_1 = require("./StaticRangeImpl");
+exports.StaticRange = StaticRangeImpl_1.StaticRangeImpl;
+var TextImpl_1 = require("./TextImpl");
+exports.Text = TextImpl_1.TextImpl;
+var TraverserImpl_1 = require("./TraverserImpl");
+exports.Traverser = TraverserImpl_1.TraverserImpl;
+var TreeWalkerImpl_1 = require("./TreeWalkerImpl");
+exports.TreeWalker = TreeWalkerImpl_1.TreeWalkerImpl;
+var WindowImpl_1 = require("./WindowImpl");
+exports.Window = WindowImpl_1.WindowImpl;
+var XMLDocumentImpl_1 = require("./XMLDocumentImpl");
+exports.XMLDocument = XMLDocumentImpl_1.XMLDocumentImpl;
+// Apply mixins
+// ChildNode
+util_1.applyMixin(ElementImpl_1.ElementImpl, ChildNodeImpl_1.ChildNodeImpl);
+util_1.applyMixin(CharacterDataImpl_1.CharacterDataImpl, ChildNodeImpl_1.ChildNodeImpl);
+util_1.applyMixin(DocumentTypeImpl_1.DocumentTypeImpl, ChildNodeImpl_1.ChildNodeImpl);
+// DocumentOrShadowRoot
+util_1.applyMixin(DocumentImpl_1.DocumentImpl, DocumentOrShadowRootImpl_1.DocumentOrShadowRootImpl);
+util_1.applyMixin(ShadowRootImpl_1.ShadowRootImpl, DocumentOrShadowRootImpl_1.DocumentOrShadowRootImpl);
+// NonDocumentTypeChildNode
+util_1.applyMixin(ElementImpl_1.ElementImpl, NonDocumentTypeChildNodeImpl_1.NonDocumentTypeChildNodeImpl);
+util_1.applyMixin(CharacterDataImpl_1.CharacterDataImpl, NonDocumentTypeChildNodeImpl_1.NonDocumentTypeChildNodeImpl);
+// NonElementParentNode
+util_1.applyMixin(DocumentImpl_1.DocumentImpl, NonElementParentNodeImpl_1.NonElementParentNodeImpl);
+util_1.applyMixin(DocumentFragmentImpl_1.DocumentFragmentImpl, NonElementParentNodeImpl_1.NonElementParentNodeImpl);
+// ParentNode
+util_1.applyMixin(DocumentImpl_1.DocumentImpl, ParentNodeImpl_1.ParentNodeImpl);
+util_1.applyMixin(DocumentFragmentImpl_1.DocumentFragmentImpl, ParentNodeImpl_1.ParentNodeImpl);
+util_1.applyMixin(ElementImpl_1.ElementImpl, ParentNodeImpl_1.ParentNodeImpl);
+// Slotable
+util_1.applyMixin(TextImpl_1.TextImpl, SlotableImpl_1.SlotableImpl);
+util_1.applyMixin(ElementImpl_1.ElementImpl, SlotableImpl_1.SlotableImpl);
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/index.js.map b/node_modules/@oozcitak/dom/lib/dom/index.js.map
new file mode 100644
index 0000000..7c11706
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dom/index.ts"],"names":[],"mappings":";;AAAA,uCAA2C;AAE3C,gCAAgC;AAChC,6DAA2D;AAkElC,0BAlEhB,yCAAmB,CAkEY;AAjExC,qDAAmD;AAkE9B,sBAlEZ,iCAAe,CAkEQ;AAjEhC,yDAAuD;AAkEhC,wBAlEd,qCAAiB,CAkEU;AAjEpC,uCAAqC;AAkEvB,eAlEL,mBAAQ,CAkEC;AAjElB,uDAAqD;AAkE/B,uBAlEb,mCAAgB,CAkES;AAjElC,yDAAuD;AAkEhC,wBAlEd,qCAAiB,CAkEU;AAjEpC,iDAA+C;AAC/C,6CAA2C;AAiE1B,kBAjER,yBAAW,CAiEI;AAhExB,qDAAmD;AAiE9B,sBAjEZ,iCAAe,CAiEQ;AAhEhC,+DAA6D;AAiEnC,2BAjEjB,2CAAoB,CAiEa;AAhE1C,+CAA6C;AAiE3B,mBAjET,2BAAY,CAiEK;AAhE1B,uEAAqE;AACrE,uDAAqD;AAgE/B,uBAhEb,mCAAgB,CAgES;AA/DlC,qCAA+B;AAgE7B,cAhEO,aAAG,CAgEP;AA/DL,iEAA+D;AAgEpC,4BAhElB,6CAAqB,CAgEc;AA/D5C,uDAAqD;AAgE/B,uBAhEb,mCAAgB,CAgES;AA/DlC,6CAA2C;AAgE1B,kBAhER,yBAAW,CAgEI;AA/DxB,yCAAuC;AAgExB,gBAhEN,qBAAS,CAgEE;AA/DpB,qDAAmD;AAgE9B,sBAhEZ,iCAAe,CAgEQ;AA/DhC,2DAAyD;AAgEjC,yBAhEf,uCAAkB,CAgEW;AA/DtC,+DAA6D;AAgEnC,2BAhEjB,2CAAoB,CAgEa;AA/D1C,2DAAyD;AAgEjC,yBAhEf,uCAAkB,CAgEW;AA/DtC,uDAAqD;AAgE/B,uBAhEb,mCAAgB,CAgES;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,CAAA;AAClD,iBAAU,CAAC,2CAAoB,EAAE,mDAAwB,CAAC,CAAA;AAC1D,aAAa;AACb,iBAAU,CAAC,2BAAY,EAAE,+BAAc,CAAC,CAAA;AACxC,iBAAU,CAAC,2CAAoB,EAAE,+BAAc,CAAC,CAAA;AAChD,iBAAU,CAAC,yBAAW,EAAE,+BAAc,CAAC,CAAA;AACvC,WAAW;AACX,iBAAU,CAAC,mBAAQ,EAAE,2BAAY,CAAC,CAAA;AAClC,iBAAU,CAAC,yBAAW,EAAE,2BAAY,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/interfaces.d.ts b/node_modules/@oozcitak/dom/lib/dom/interfaces.d.ts
new file mode 100644
index 0000000..8510575
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/interfaces.d.ts
@@ -0,0 +1,2218 @@
+import { FixedSizeSet } from "@oozcitak/util";
+import { URLRecord } from "@oozcitak/url/lib/interfaces";
+/**
+ * Defines DOM features supported by algorithms.
+ */
+export declare type DOMFeatures = {
+ /**
+ * Enables or disables mutation observer algorithms.
+ */
+ mutationObservers: boolean;
+ /**
+ * Enables or disables custom element algorithms.
+ */
+ customElements: boolean;
+ /**
+ * Enables or disables slot algorithms.
+ */
+ slots: boolean;
+ /**
+ * Enables or disables various run steps defined in algorithms.
+ */
+ steps: boolean;
+ [key: string]: boolean;
+};
+/**
+ * Represents a window containing a DOM document.
+ */
+export interface Window extends EventTarget {
+ /**
+ * Returns the Event which is currently being handled.
+ *
+ * _Note:_ Note: This property can be fragile, in that there may be situations
+ * in which the returned Event is not the expected value. In addition,
+ * Window.event is not accurate for events dispatched within shadow trees.
+ */
+ readonly event?: Event;
+ /**
+ * Returns the associated Document.
+ */
+ readonly document: Document;
+ _currentEvent?: Event;
+ _signalSlots: Set;
+ _mutationObserverMicrotaskQueued: boolean;
+ _mutationObservers: Set;
+ _associatedDocument: Document;
+ _iteratorList: FixedSizeSet;
+}
+/**
+ * Represents a DOM event.
+ */
+export interface Event {
+ NONE: number;
+ CAPTURING_PHASE: number;
+ AT_TARGET: number;
+ BUBBLING_PHASE: number;
+ /**
+ * Returns the type of event.
+ */
+ readonly type: string;
+ /**
+ * Returns the object to which event is dispatched (its target).
+ */
+ readonly target: EventTarget | null;
+ /**
+ * Historical alias of target.
+ */
+ readonly srcElement: EventTarget | null;
+ /**
+ * Returns the object whose event listener's callback is currently
+ * being invoked.
+ */
+ readonly currentTarget: EventTarget | null;
+ /**
+ * Returns the event's path (objects on which listeners will be
+ * invoked). This does not include nodes in shadow trees if the
+ * shadow root was created with its `mode` `"closed"`.
+ */
+ composedPath(): EventTarget[];
+ /**
+ * Returns the event's phase.
+ */
+ readonly eventPhase: EventPhase;
+ /**
+ * Prevents event from reaching any objects other than the current
+ * object.
+ */
+ stopPropagation(): void;
+ /**
+ * Historical alias of `stopPropagation()`.
+ */
+ cancelBubble: boolean;
+ /**
+ * Prevents event from reaching any registered event listeners after
+ * the current one finishes running.
+ */
+ stopImmediatePropagation(): void;
+ /**
+ * Returns `true` if the event goes through its target's ancestors in
+ * reverse tree order, and `false` otherwise.
+ */
+ readonly bubbles: boolean;
+ /**
+ * A historical alias of `stopPropagation()`.
+ */
+ readonly cancelable: boolean;
+ /**
+ * Historical property.
+ */
+ returnValue: boolean;
+ /**
+ * Cancels the event (if it is cancelable).
+ */
+ preventDefault(): void;
+ /**
+ * Indicates whether the event was cancelled with `preventDefault()`.
+ */
+ readonly defaultPrevented: boolean;
+ /**
+ * Determines whether the event can bubble to the shadow DOM.
+ */
+ readonly composed: boolean;
+ /**
+ * Returns `true` if event was dispatched by the user agent, and
+ * `false` otherwise.
+ */
+ readonly isTrusted: boolean;
+ /**
+ * Returns the the number of milliseconds measured relative to the
+ * time origin.
+ */
+ readonly timeStamp: number;
+ /**
+ * Historical method to initializes the value of an event.
+ *
+ * @param type - the type of event.
+ * @param bubbles - whether the event propagates in reverse.
+ * @param cancelable - whether the event can be cancelled.
+ */
+ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
+ _target: PotentialEventTarget;
+ _relatedTarget: PotentialEventTarget;
+ _touchTargetList: PotentialEventTarget[];
+ _path: EventPathItem[];
+ _stopPropagationFlag: boolean;
+ _stopImmediatePropagationFlag: boolean;
+ _canceledFlag: boolean;
+ _inPassiveListenerFlag: boolean;
+ _composedFlag: boolean;
+ _initializedFlag: boolean;
+ _dispatchFlag: boolean;
+ _isTrusted: boolean;
+ _currentTarget: PotentialEventTarget;
+ _eventPhase: EventPhase;
+ _type: string;
+ _bubbles: boolean;
+ _cancelable: boolean;
+ _timeStamp: number;
+}
+/**
+ * Represents and event that carries custom data.
+ */
+export interface CustomEvent extends Event {
+ /**
+ * Gets custom event data.
+ */
+ readonly detail: any;
+ /**
+ * Initializes the value of an event.
+ *
+ * @param type - the type of event.
+ * @param bubbles - whether the event propagates in reverse.
+ * @param cancelable - whether the event can be cancelled.
+ * @param detail - custom event data
+ */
+ initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: any): void;
+}
+/**
+ * Represents an object that is used to observe mutations to the node tree.
+ */
+export interface MutationObserver {
+ /**
+ * Observes a given target and reports any mutations based on options.
+ *
+ * @param target - the node to observe
+ * @param options - mutation criteria to observe
+ */
+ observe(target: Node, options?: MutationObserverInit): void;
+ /**
+ * Stops observing mutations.
+ */
+ disconnect(): void;
+ /**
+ * Returns the list of mutations.
+ */
+ takeRecords(): MutationRecord[];
+ _callback: MutationCallback;
+ _nodeList: Node[];
+ _recordQueue: MutationRecord[];
+}
+/**
+ * Represents a mutation record.
+ */
+export interface MutationRecord {
+ /**
+ * Returns `"attributes"` if it was an attribute mutation,
+ * `"characterData"` if it was a mutation to a CharacterData node,
+ * and `"childList"` if it was a mutation to the tree of nodes.
+ */
+ readonly type: "attributes" | "characterData" | "childList";
+ /**
+ * Returns the node the mutation affected.
+ */
+ readonly target: Node;
+ /**
+ * Returns a list of added nodes.
+ */
+ readonly addedNodes: NodeList;
+ /**
+ * Returns a list of removed nodes.
+ */
+ readonly removedNodes: NodeList;
+ /**
+ * Returns the previous sibling of added or removed nodes.
+ */
+ readonly previousSibling: Node | null;
+ /**
+ * Returns the next sibling of added or removed nodes.
+ */
+ readonly nextSibling: Node | null;
+ /**
+ * Returns the local name of the changed attribute, and `null` otherwise.
+ */
+ readonly attributeName: string | null;
+ /**
+ * Returns the namespace of the changed attribute, and `null` otherwise.
+ */
+ readonly attributeNamespace: string | null;
+ /**
+ * Returns a value depending on `type`:
+ * * For `"attributes"` the attribute value before the change,
+ * * For `"characterData"` node `data` before the change,
+ * * For `"childList"` `null`.
+ */
+ readonly oldValue: string | null;
+}
+/**
+ * Represents an object that receive event notifications.
+ */
+export interface EventListener {
+ /**
+ * A callback function that is called when an event occurs.
+ *
+ * @param event - the event to handle.
+ */
+ handleEvent: (event: Event) => void;
+}
+/**
+ * Represents an object that can receive events.
+ */
+export interface EventTarget {
+ /**
+ * Registers an event handler.
+ *
+ * @param type - event type to listen for.
+ * @param callback - object to receive a notification when an event occurs.
+ * @param options - object that specifies event characteristics.
+ */
+ addEventListener(type: string, callback: EventListener | null | ((event: Event) => void), options?: {
+ passive: boolean;
+ once: boolean;
+ capture: boolean;
+ } | boolean): void;
+ /**
+ * Removes an event listener.
+ *
+ * @param type - event type to listen for.
+ * @param callback - object to receive a notification when an event occurs.
+ * @param options - object that specifies event characteristics.
+ */
+ removeEventListener(type: string, callback: EventListener | null | ((event: Event) => void), options?: {
+ capture: boolean;
+ } | boolean): void;
+ /**
+ * Dispatches an event to this event target.
+ *
+ * @param event - the event to dispatch.
+ */
+ dispatchEvent(event: Event): boolean;
+ _eventListenerList: EventListenerEntry[];
+ _eventHandlerMap: {
+ [key: string]: EventHandlerEntry;
+ };
+ /**
+ * Gets the parent event target for the given event.
+ *
+ * @param event - an event
+ */
+ _getTheParent(event: Event): EventTarget | null;
+ /**
+ * Defines optional activation behavior for the given event.
+ *
+ * _Note:_ This exists because user agents perform certain actions for certain
+ * EventTarget objects, e.g., the area element, in response to synthetic
+ * MouseEvent events whose type attribute is click. Web compatibility
+ * prevented it from being removed and it is now the enshrined way of
+ * defining an activation of something.
+ *
+ * @param event - an event
+ */
+ _activationBehavior?(event: Event): void;
+ /**
+ * Defines optional legacy pre-activation behavior for the given event.
+ *
+ * _Note:_ These algorithms only exist for checkbox and radio input elements
+ * and are not to be used for anything else.
+ *
+ * @param event - an event
+ */
+ _legacyPreActivationBehavior?(event: Event): void;
+ /**
+ * Defines optional legacy canceled activation behavior for the given event.
+ *
+ * _Note:_ These algorithms only exist for checkbox and radio input elements
+ * and are not to be used for anything else.
+ *
+ * @param event - an event
+ */
+ _legacyCanceledActivationBehavior?(event: Event): void;
+}
+/**
+ * Represents a controller that allows to abort DOM requests.
+ */
+export interface AbortController {
+ /**
+ * Returns the AbortSignal object associated with this object.
+ */
+ readonly signal: AbortSignal;
+ /**
+ * Sets the aborted flag and signals any observers that the associated
+ * activity is to be aborted.
+ */
+ abort(): void;
+ _signal: AbortSignal;
+}
+/**
+ * Represents a signal object that communicates with a DOM request and abort
+ * it through an AbortController.
+ */
+export interface AbortSignal extends EventTarget {
+ /**
+ * Returns `true` if the controller is to abort, and `false` otherwise.
+ */
+ readonly aborted: boolean;
+ /**
+ * Raises an event when the controller has aborted.
+ */
+ onabort: EventHandler;
+ _abortedFlag: boolean;
+ _abortAlgorithms: Set<(...args: any[]) => any>;
+}
+/**
+ * Represents a generic XML node.
+ */
+export interface Node extends EventTarget {
+ ELEMENT_NODE: number;
+ ATTRIBUTE_NODE: number;
+ TEXT_NODE: number;
+ CDATA_SECTION_NODE: number;
+ ENTITY_REFERENCE_NODE: number;
+ ENTITY_NODE: number;
+ PROCESSING_INSTRUCTION_NODE: number;
+ COMMENT_NODE: number;
+ DOCUMENT_NODE: number;
+ DOCUMENT_TYPE_NODE: number;
+ DOCUMENT_FRAGMENT_NODE: number;
+ NOTATION_NODE: number;
+ DOCUMENT_POSITION_DISCONNECTED: number;
+ DOCUMENT_POSITION_PRECEDING: number;
+ DOCUMENT_POSITION_FOLLOWING: number;
+ DOCUMENT_POSITION_CONTAINS: number;
+ DOCUMENT_POSITION_CONTAINED_BY: number;
+ DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ /**
+ * Returns the type of node.
+ */
+ readonly nodeType: NodeType;
+ /**
+ * Returns a string appropriate for the type of node.
+ */
+ readonly nodeName: string;
+ /**
+ * Gets the absolute base URL of the node.
+ */
+ readonly baseURI: string;
+ /**
+ * Returns whether the node is rooted to a document node.
+ */
+ readonly isConnected: boolean;
+ /**
+ * Returns the parent document.
+ */
+ readonly ownerDocument: Document | null;
+ /**
+ * Returns the root node.
+ *
+ * @param options - if options has `composed = true` this function
+ * returns the node's shadow-including root, otherwise it returns
+ * the node's root node.
+ */
+ getRootNode(options?: GetRootNodeOptions): Node;
+ /**
+ * Returns the parent node.
+ */
+ readonly parentNode: Node | null;
+ /**
+ * Returns the parent element.
+ */
+ readonly parentElement: Element | null;
+ /**
+ * Determines whether a node has any children.
+ */
+ hasChildNodes(): boolean;
+ /**
+ * Returns a {@link NodeList} of child nodes.
+ */
+ readonly childNodes: NodeList;
+ /**
+ * Returns the first child node.
+ */
+ readonly firstChild: Node | null;
+ /**
+ * Returns the last child node.
+ */
+ readonly lastChild: Node | null;
+ /**
+ * Returns the previous sibling node.
+ */
+ readonly previousSibling: Node | null;
+ /**
+ * Returns the next sibling node.
+ */
+ readonly nextSibling: Node | null;
+ /**
+ * Gets or sets the data associated with a {@link CharacterData} node.
+ * For other node types returns `null`.
+ */
+ nodeValue: string | null;
+ /**
+ * Returns the concatenation of data of all the {@link CharacterData}
+ * node descendants in tree order. When set, replaces the text
+ * contents of the node with the given value.
+ */
+ textContent: string | null;
+ /**
+ * Puts all {@link Text} nodes in the full depth of the sub-tree
+ * underneath this node into a "normal" form where only markup
+ * (e.g., tags, comments, processing instructions, CDATA sections,
+ * and entity references) separates {@link Text} nodes, i.e., there
+ * are no adjacent text nodes.
+ */
+ normalize(): void;
+ /**
+ * Returns a duplicate of this node, i.e., serves as a generic copy
+ * constructor for nodes. The duplicate node has no parent
+ * ({@link parentNode} returns `null`).
+ *
+ * @param deep - if `true`, recursively clone the subtree under the
+ * specified node if `false`, clone only the node itself (and its
+ * attributes, if it is an {@link Element}).
+ */
+ cloneNode(deep?: boolean): Node;
+ /**
+ * Determines if the given node is equal to this one.
+ *
+ * @param node - the node to compare with
+ */
+ isEqualNode(node?: Node | null): boolean;
+ /**
+ * Determines if the given node is reference equal to this one.
+ *
+ * @param node - the node to compare with
+ */
+ isSameNode(node?: Node | null): boolean;
+ /**
+ * Returns a bitmask indicating the position of the given `node`
+ * relative to this node.
+ */
+ compareDocumentPosition(node: Node): Position;
+ /**
+ * Returns `true` if given node is an inclusive descendant of this
+ * node, and `false` otherwise (including when other node is `null`).
+ *
+ * @param node - the node to check
+ */
+ contains(node: Node | null): boolean;
+ /**
+ * Returns the prefix for a given namespace URI, if present, and
+ * `null` if not.
+ *
+ * @param namespace - the namespace to search
+ */
+ lookupPrefix(namespace: string | null): string | null;
+ /**
+ * Returns the namespace URI for a given prefix if present, and `null`
+ * if not.
+ *
+ * @param prefix - the prefix to search
+ */
+ lookupNamespaceURI(prefix: string | null): string | null;
+ /**
+ * Returns `true` if the namespace is the default namespace on this
+ * node or `false` if not.
+ *
+ * @param namespace - the namespace to check
+ */
+ isDefaultNamespace(namespace: string | null): boolean;
+ /**
+ * Inserts the node `newChild` before the existing child node
+ * `refChild`. If `refChild` is `null`, inserts `newChild` at the end
+ * of the list of children.
+ *
+ * If `newChild` is a {@link DocumentFragment} object, all of its
+ * children are inserted, in the same order, before `refChild`.
+ *
+ * If `newChild` is already in the tree, it is first removed.
+ *
+ * @param newChild - the node to insert
+ * @param refChild - the node before which the new node must be
+ * inserted
+ *
+ * @returns the newly inserted child node
+ */
+ insertBefore(newChild: Node, refChild: Node | null): Node;
+ /**
+ * Adds the node `newChild` to the end of the list of children of this
+ * node, and returns it. If `newChild` is already in the tree, it is
+ * first removed.
+ *
+ * If `newChild` is a {@link DocumentFragment} object, the entire
+ * contents of the document fragment are moved into the child list of
+ * this node.
+ *
+ * @param newChild - the node to add
+ *
+ * @returns the newly inserted child node
+ */
+ appendChild(newChild: Node): Node;
+ /**
+ * Replaces the child node `oldChild` with `newChild` in the list of
+ * children, and returns the `oldChild` node. If `newChild` is already
+ * in the tree, it is first removed.
+ *
+ * @param newChild - the new node to put in the child list
+ * @param oldChild - the node being replaced in the list
+ *
+ * @returns the removed child node
+ */
+ replaceChild(newChild: Node, oldChild: Node): Node;
+ /**
+ * Removes the child node indicated by `oldChild` from the list of
+ * children, and returns it.
+ *
+ * @param oldChild - the node being removed from the list
+ *
+ * @returns the removed child node
+ */
+ removeChild(oldChild: Node): Node;
+ _nodeDocument: Document;
+ _registeredObserverList: Array;
+ /**
+ * Used to keep track of parent-child relations in the tree. These are
+ * non-standard properties.
+ */
+ _nodeType: NodeType;
+ _parent: Node | null;
+ _children: Set;
+ _firstChild: Node | null;
+ _lastChild: Node | null;
+ _previousSibling: Node | null;
+ _nextSibling: Node | null;
+}
+/**
+ * Represents a generic text node.
+ */
+export interface CharacterData extends Node, NonDocumentTypeChildNode, ChildNode {
+ /**
+ * Gets or sets the text data of the node.
+ */
+ data: string;
+ /**
+ * Returns the number of code units in {@link data}.
+ */
+ readonly length: number;
+ /**
+ * Returns `count` number of characters from node data starting at
+ * the given `offset`.
+ *
+ * @param offset - the offset at which retrieval starts
+ * @param count - the number of characters to return
+ */
+ substringData(offset: number, count: number): string;
+ /**
+ * Appends the given string to text data of the node.
+ *
+ * @param data - the string of text to add to node data
+ */
+ appendData(data: string): void;
+ /**
+ * Inserts the given string into the text data of the node starting at
+ * the given `offset`.
+ *
+ * @param offset - the offset at which insertion starts
+ * @param data - the string of text to add to node data
+ */
+ insertData(offset: number, data: string): void;
+ /**
+ * Deletes `count` number of characters from node data starting at
+ * the given `offset`.
+ *
+ * @param offset - the offset at which removal starts
+ * @param count - the number of characters to delete
+ */
+ deleteData(offset: number, count: number): void;
+ /**
+ * Deletes `count` number of characters from node data starting at
+ * the given `offset` and replaces it with the given `data`.
+ *
+ * @param offset - the offset at which removal starts
+ * @param count - the number of characters to delete
+ * @param data - the string of text to add to node data
+ */
+ replaceData(offset: number, count: number, data: string): void;
+ _data: string;
+}
+/**
+ * Represents a text node.
+ */
+export interface Text extends CharacterData, Slotable {
+ /**
+ * Splits data at the given offset and returns the remainder as a text
+ * node.
+ *
+ * @param offset - the offset at which to split nodes.
+ */
+ splitText(offset: number): Text;
+ /**
+ * Returns the combined data of all direct text node siblings.
+ */
+ readonly wholeText: string;
+}
+/**
+ * Represents a collection of elements.
+ */
+export interface HTMLCollection extends Collection, Iterable {
+ /**
+ * Returns the number of elements in the collection.
+ */
+ readonly length: number;
+ /**
+ * Returns the element with index `index` from the collection.
+ *
+ * @param index - the zero-based index of the element to return
+ */
+ item(index: number): Element | null;
+ /**
+ * Returns the first element with ID or name `name` from the
+ * collection.
+ *
+ * @param name - the name of the element to return
+ */
+ namedItem(name: string): Element | null;
+ /**
+ * Returns the element with index index from the collection. The
+ * elements are sorted in tree order.
+ */
+ [index: number]: Element | undefined;
+ [key: string]: any;
+}
+/**
+ * Represents a document node.
+ */
+export interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode {
+ /**
+ * Returns the {@link DOMImplementation} object that is associated
+ * with the document.
+ */
+ readonly implementation: DOMImplementation;
+ /**
+ * Returns the document's URL.
+ */
+ readonly URL: string;
+ /**
+ * Gets or sets the document's URL.
+ */
+ readonly documentURI: string;
+ /**
+ * Returns the document's origin.
+ */
+ readonly origin: string;
+ /**
+ * Returns whether the document is rendered in Quirks mode or
+ * Standards mode.
+ */
+ readonly compatMode: string;
+ /**
+ * Returns the character set.
+ */
+ readonly characterSet: string;
+ /**
+ * Gets or sets the character set.
+ */
+ readonly charset: string;
+ /**
+ * Returns the character set.
+ */
+ readonly inputEncoding: string;
+ /**
+ * Returns the MIME type of the document.
+ */
+ readonly contentType: string;
+ /**
+ * Returns the {@link DocType} or `null` if there is none.
+ */
+ readonly doctype: DocumentType | null;
+ /**
+ * Returns the document element or `null` if there is none.
+ */
+ readonly documentElement: Element | null;
+ /**
+ * Returns a {@link HTMLCollection} of all descendant elements
+ * whose qualified name is `qualifiedName`.
+ *
+ * @param qualifiedName - the qualified name to match or `*` to match all
+ * descendant elements.
+ *
+ * @returns an {@link HTMLCollection} of matching descendant
+ * elements
+ */
+ getElementsByTagName(qualifiedName: string): HTMLCollection;
+ /**
+ * Returns a {@link HTMLCollection} of all descendant elements
+ * whose namespace is `namespace` and local name is `localName`.
+ *
+ * @param namespace - the namespace to match or `*` to match any
+ * namespace.
+ * @param localName - the local name to match or `*` to match any
+ * local name.
+ *
+ * @returns an {@link HTMLCollection} of matching descendant
+ * elements
+ */
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollection;
+ /**
+ * Returns a {@link HTMLCollection} of all descendant elements
+ * whose classes are contained in the list of classes given in
+ * `classNames`.
+ *
+ * @param classNames - a space-separated list of classes
+ *
+ * @returns an {@link HTMLCollection} of matching descendant
+ * elements
+ */
+ getElementsByClassName(classNames: string): HTMLCollection;
+ /**
+ * Returns a new {@link Element} with the given `localName`.
+ *
+ * @param localName - local name
+ * @param options - element options
+ *
+ * @returns the new {@link Element}
+ */
+ createElement(localName: string, options?: string | {
+ is: string;
+ }): Element;
+ /**
+ * Returns a new {@link Element} with the given `namespace` and
+ * `qualifiedName`.
+ *
+ * @param namespace - namespace URL
+ * @param qualifiedName - qualified name
+ * @param options - element options
+ *
+ * @returns the new {@link Element}
+ */
+ createElementNS(namespace: string | null, qualifiedName: string, options?: string | {
+ is: string;
+ }): Element;
+ /**
+ * Returns a new {@link DocumentFragment}.
+ *
+ * @returns the new {@link DocumentFragment}
+ */
+ createDocumentFragment(): DocumentFragment;
+ /**
+ * Returns a new {@link Text} with the given `data`.
+ *
+ * @param data - text content
+ *
+ * @returns the new {@link Text}
+ */
+ createTextNode(data: string): Text;
+ /**
+ * Returns a new {@link CDATASection} with the given `data`.
+ *
+ * @param data - text content
+ *
+ * @returns the new {@link CDATASection}
+ */
+ createCDATASection(data: string): CDATASection;
+ /**
+ * Returns a new {@link Comment} with the given `data`.
+ *
+ * @param data - text content
+ *
+ * @returns the new {@link Comment}
+ */
+ createComment(data: string): Comment;
+ /**
+ * Returns a new {@link ProcessingInstruction} with the given `target`
+ * and `data`.
+ *
+ * @param target - instruction target
+ * @param data - text content
+ *
+ * @returns the new {@link ProcessingInstruction}
+ */
+ createProcessingInstruction(target: string, data: string): ProcessingInstruction;
+ /**
+ * Returns a copy of `node`.
+ *
+ * @param deep - true to include descendant nodes.
+ *
+ * @returns clone of node
+ */
+ importNode(node: Node, deep?: boolean): Node;
+ /**
+ * Moves `node` from another document into this document and returns
+ * it.
+ *
+ * @param node - node to move.
+ *
+ * @returns the adopted node
+ */
+ adoptNode(node: Node): Node;
+ /**
+ * Returns a new {@link Attr} with the given `localName`.
+ *
+ * @param localName - local name
+ *
+ * @returns the new {@link Attr}
+ */
+ createAttribute(localName: string): Attr;
+ /**
+ * Returns a new {@link Attr} with the given `namespace` and
+ * `qualifiedName`.
+ *
+ * @param namespace - namespace URL
+ * @param qualifiedName - qualified name
+ *
+ * @returns the new {@link Attr}
+ */
+ createAttributeNS(namespace: string | null, qualifiedName: string): Attr;
+ /**
+ * Creates an event of the type specified.
+ *
+ * @param eventInterface - a string representing the type of event
+ * to be created
+ */
+ createEvent(eventInterface: string): Event;
+ /**
+ * Creates a new Range object.
+ */
+ createRange(): Range;
+ /**
+ * Creates a new `NodeIterator` object.
+ * @param root - the node to which the iterator is attached.
+ * @param whatToShow - a filter on node type.
+ * @param filter - a user defined filter.
+ */
+ createNodeIterator(root: Node, whatToShow?: WhatToShow, filter?: NodeFilter | ((node: Node) => FilterResult) | null): NodeIterator;
+ /**
+ * Creates a new `TreeWalker` object.
+ * @param root - the node to which the iterator is attached.
+ * @param whatToShow - a filter on node type.
+ * @param filter - a user defined filter.
+ */
+ createTreeWalker(root: Node, whatToShow?: WhatToShow, filter?: NodeFilter | ((node: Node) => FilterResult) | null): TreeWalker;
+ _encoding: {
+ name: string;
+ labels: string[];
+ };
+ _contentType: string;
+ _URL: URLRecord;
+ _origin: Origin;
+ _type: "xml" | "html";
+ _mode: "no-quirks" | "quirks" | "limited-quirks";
+ _documentElement: Element | null;
+ _hasNamespaces: boolean;
+}
+/**
+ * Represents an XML document.
+ */
+export interface XMLDocument extends Document {
+}
+/**
+ * Represents a document fragment in the XML tree.
+ */
+export interface DocumentFragment extends Node, NonElementParentNode, ParentNode {
+ _host: Element | null;
+}
+/**
+ * Represents a shadow root.
+ */
+export interface ShadowRoot extends DocumentFragment, DocumentOrShadowRoot {
+ /**
+ * Gets the shadow root's mode.
+ */
+ readonly mode: ShadowRootMode;
+ /**
+ * Gets the shadow root's host.
+ */
+ readonly host: Element;
+ _host: Element;
+ _mode: ShadowRootMode;
+}
+/**
+ * Represents an element node.
+ */
+export interface Element extends Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slotable {
+ /**
+ * Gets the namespace URI.
+ */
+ readonly namespaceURI: string | null;
+ /**
+ * Gets the namespace prefix.
+ */
+ readonly prefix: string | null;
+ /**
+ * Gets the local name.
+ */
+ readonly localName: string;
+ /**
+ * If namespace prefix is not `null`, returns the concatenation of
+ * namespace prefix, `":"`, and local name. Otherwise it returns the
+ * local name.
+ */
+ readonly tagName: string;
+ /**
+ * Gets or sets the identifier of this element.
+ */
+ id: string;
+ /**
+ * Gets or sets the class name of this element.
+ */
+ className: string;
+ /**
+ * Returns a {@link DOMTokenList} with tokens from the class
+ * attribute.
+ */
+ readonly classList: DOMTokenList;
+ /**
+ * Gets or sets the slot attribute of this element.
+ */
+ slot: string;
+ /**
+ * Determines if the element node contains any attributes.
+ */
+ hasAttributes(): boolean;
+ /**
+ * Returns a {@link NamedNodeMap} of attributes.
+ */
+ readonly attributes: NamedNodeMap;
+ /**
+ * Returns the list of all attribute's qualified names.
+ */
+ getAttributeNames(): string[];
+ /**
+ * Returns the value of the attribute with the given `name`.
+ *
+ * @param qualifiedName - attribute name
+ */
+ getAttribute(qualifiedName: string): string | null;
+ /**
+ * Returns the value of the attribute with the given `namespace` and
+ * `localName`.
+ *
+ * @param namespace - namespace to search for
+ * @param localName - local name to search for
+ */
+ getAttributeNS(namespace: string | null, localName: string): string | null;
+ /**
+ * Sets the value of the attribute with the given `name`.
+ *
+ * @param qualifiedName - attribute name
+ * @param value - attribute value to set
+ */
+ setAttribute(qualifiedName: string, value: string): void;
+ /**
+ * Sets the value of the attribute with the given `namespace` and
+ * `qualifiedName`.
+ *
+ * @param namespace - namespace to search for
+ * @param qualifiedName - qualified name to search for
+ * @param value - attribute value to set
+ */
+ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
+ /**
+ * Removes the attribute with the given `name`.
+ *
+ * @param qualifiedName - attribute name
+ */
+ removeAttribute(qualifiedName: string): void;
+ /**
+ * Removes the attribute with the given `namespace` and `localName`.
+ *
+ * @param namespace - namespace to search for
+ * @param localName - local name to search for
+ */
+ removeAttributeNS(namespace: string | null, localName: string): void;
+ /**
+ * Determines whether the attribute with the given `name` exists.
+ *
+ * @param qualifiedName - attribute name
+ */
+ hasAttribute(qualifiedName: string): boolean;
+ /**
+ * Toggles a boolean attribute (removing it if it is present and adding it
+ * if it is not present).
+ *
+ * @param qualifiedName - attribute name
+ * @param force - whether the attribute should be added or removed,
+ * no matter whether the attribute is present or not
+ */
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
+ /**
+ * Determines whether the attribute with the given `namespace` and
+ * `localName` exists.
+ *
+ * @param namespace - namespace to search for
+ * @param localName - local name to search for
+ */
+ hasAttributeNS(namespace: string | null, localName: string): boolean;
+ /**
+ * Returns the attribute with the given `name`.
+ *
+ * @param qualifiedName - attribute name
+ */
+ getAttributeNode(qualifiedName: string): Attr | null;
+ /**
+ * Returns the attribute with the given `namespace` and
+ * `localName`.
+ *
+ * @param namespace - namespace to search for
+ * @param localName - local name to search for
+ */
+ getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
+ /**
+ * Sets the attribute given with `attr`.
+ *
+ * @param attr - attribute to set
+ */
+ setAttributeNode(attr: Attr): Attr | null;
+ /**
+ * Sets the attribute given with `attr`.
+ *
+ * @param attr - attribute to set
+ */
+ setAttributeNodeNS(attr: Attr): Attr | null;
+ /**
+ * Removes the given attribute.
+ *
+ * @param attr - attribute to remove
+ */
+ removeAttributeNode(attr: Attr): Attr;
+ /**
+ * Creates a shadow root for element and returns it.
+ *
+ * @param init - A ShadowRootInit dictionary.
+ */
+ attachShadow(init: {
+ mode: ShadowRootMode;
+ }): ShadowRoot;
+ /**
+ * Returns element's shadow root, if any, and if shadow root's mode
+ * is `"open"`, and null otherwise.
+ */
+ readonly shadowRoot: ShadowRoot | null;
+ /**
+ * Returns the first (starting at element) inclusive ancestor that
+ * matches selectors, and `null` otherwise.
+ *
+ * @param selectors
+ */
+ closest(selectors: string): Element | null;
+ /**
+ * Returns `true` if matching selectors against element's root yields
+ * element, and `false` otherwise.
+ *
+ * @param selectors
+ */
+ matches(selectors: string): boolean;
+ /**
+ * Historical alias of `matches`.
+ */
+ webkitMatchesSelector(selectors: string): boolean;
+ /**
+ * Returns a {@link HTMLCollection} of all descendant elements
+ * whose qualified name is `qualifiedName`.
+ *
+ * @param qualifiedName - the qualified name to match or `*` to match
+ * all descendant elements.
+ *
+ * @returns an {@link HTMLCollection} of matching descendant
+ * elements
+ */
+ getElementsByTagName(qualifiedName: string): HTMLCollection;
+ /**
+ * Returns a {@link HTMLCollection} of all descendant elements
+ * whose namespace is `namespace` and local name is `localName`.
+ *
+ * @param namespace - the namespace to match or `*` to match any
+ * namespace.
+ * @param localName - the local name to match or `*` to match any
+ * local name.
+ *
+ * @returns an {@link HTMLCollection} of matching descendant
+ * elements
+ */
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollection;
+ /**
+ * Returns a {@link HTMLCollection} of all descendant elements
+ * whose classes are contained in the list of classes given in
+ * `classNames`.
+ *
+ * @param classNames - a space-separated list of classes
+ *
+ * @returns an {@link HTMLCollection} of matching descendant
+ * elements
+ */
+ getElementsByClassName(classNames: string): HTMLCollection;
+ /**
+ * Inserts a given element node at a given position relative to this
+ * node.
+ *
+ * @param where - a string defining where to insert the element node.
+ * - `beforebegin` before this element itself.
+ * - `afterbegin` before the first child.
+ * - `beforeend` after the last child.
+ * - `afterend` after this element itself.
+ * @param element - the element to insert
+ *
+ * @returns the inserted element
+ */
+ insertAdjacentElement(where: "beforebegin" | "afterbegin" | "beforeend" | "afterend", element: Element): Element | null;
+ /**
+ * Inserts a given text node at a given position relative to this
+ * node.
+ *
+ * @param where - a string defining where to insert the element node.
+ * - `beforebegin` before this element itself.
+ * - `afterbegin` before the first child.
+ * - `beforeend` after the last child.
+ * - `afterend` after this element itself.
+ * @param data - text node data
+ *
+ * @returns the inserted element
+ */
+ insertAdjacentText(where: "beforebegin" | "afterbegin" | "beforeend" | "afterend", data: string): void;
+ _namespace: string | null;
+ _namespacePrefix: string | null;
+ _localName: string;
+ _customElementState: "undefined" | "failed" | "uncustomized" | "custom";
+ _customElementDefinition: CustomElementDefinition | null;
+ _is: string | null;
+ _shadowRoot: ShadowRoot | null;
+ readonly _qualifiedName: string;
+ readonly _htmlUppercasedQualifiedName: string;
+ _attributeList: NamedNodeMap;
+ _attributeChangeSteps: AttributeChangeStep[];
+ _uniqueIdentifier?: string;
+}
+/**
+ * Represents an object providing methods which are not dependent on
+ * any particular document
+ */
+export interface DocumentType extends Node, ChildNode {
+ /**
+ * Returns the name of the node.
+ */
+ readonly name: string;
+ /**
+ * Returns the `PUBLIC` identifier of the node.
+ */
+ readonly publicId: string;
+ /**
+ * Returns the `SYSTEM` identifier of the node.
+ */
+ readonly systemId: string;
+ _name: string;
+ _publicId: string;
+ _systemId: string;
+}
+/**
+ * Represents a mixin that extends non-element parent nodes. This mixin
+ * is implemented by {@link Document} and {@link DocumentFragment}.
+ */
+export interface NonElementParentNode {
+ /**
+ * Returns an {@link Element} who has an id attribute `elementId`.
+ *
+ * @param id - the value of the `id` attribute to match
+ */
+ getElementById(id: string): Element | null;
+}
+/**
+ * Represents a mixin for an interface to be used to share APIs between
+ * documents and shadow roots. This mixin is implemented by
+ * {@link Document} and {@link ShadowRoot}.
+ */
+export interface DocumentOrShadowRoot {
+}
+/**
+ * Represents a mixin that extends parent nodes that can have children.
+ * This mixin is implemented by {@link Element}, {@link Document} and
+ * {@link DocumentFragment}.
+ */
+export interface ParentNode {
+ /**
+ * Returns the child elements.
+ */
+ readonly children: HTMLCollection;
+ /**
+ * Returns the first child that is an element, and `null` otherwise.
+ */
+ readonly firstElementChild: Element | null;
+ /**
+ * Returns the last child that is an element, and `null` otherwise.
+ */
+ readonly lastElementChild: Element | null;
+ /**
+ * Returns the number of children that are elements.
+ */
+ readonly childElementCount: number;
+ /**
+ * Prepends the list of nodes or strings before the first child node.
+ * Strings are converted into {@link Text} nodes.
+ *
+ * @param nodes - the array of nodes or strings
+ */
+ prepend(...nodes: (Node | string)[]): void;
+ /**
+ * Appends the list of nodes or strings after the last child node.
+ * Strings are converted into {@link Text} nodes.
+ *
+ * @param nodes - the array of nodes or strings
+ */
+ append(...nodes: (Node | string)[]): void;
+ /**
+ * Returns the first element that is a descendant of node that
+ * matches selectors.
+ *
+ * @param selectors - a selectors string
+ */
+ querySelector(selectors: string): Element | null;
+ /**
+ * Returns all element descendants of node that match selectors.
+ *
+ * @param selectors - a selectors string
+ */
+ querySelectorAll(selectors: string): NodeList;
+}
+/**
+ * Represents a mixin that extends child nodes that can have siblings
+ * including doctypes. This mixin is implemented by {@link Element},
+ * {@link CharacterData} and {@link DocumentType}.
+ */
+export interface ChildNode {
+ /**
+ * Inserts nodes just before this node, while replacing strings in
+ * nodes with equivalent text nodes.
+ */
+ before(...nodes: (Node | string)[]): void;
+ /**
+ * Inserts nodes just after this node, while replacing strings in
+ * nodes with equivalent text nodes.
+ */
+ after(...nodes: (Node | string)[]): void;
+ /**
+ * Replaces nodes with this node, while replacing strings in
+ * nodes with equivalent text nodes.
+ */
+ replaceWith(...nodes: (Node | string)[]): void;
+ /**
+ * Removes this node form its tree.
+ */
+ remove(): void;
+}
+/**
+ * Represents a slot element of a shadow tree.
+ */
+export interface Slot extends Element {
+ _name: string;
+ _assignedNodes: Slotable[];
+}
+/**
+ * Represents a mixin that allows nodes to become the contents of
+ * a element. This mixin is implemented by {@link Element} and
+ * {@link Text}.
+ */
+export interface Slotable {
+ /**
+ * Returns the element which this node is inserted in.
+ */
+ readonly assignedSlot: HTMLSlotElement | null;
+ _name: string;
+ _assignedSlot: Slot | null;
+}
+/**
+ * Represents an attribute of an element node.
+ */
+export interface Attr extends Node {
+ /**
+ * Gets the namespace URI.
+ */
+ readonly namespaceURI: string | null;
+ /**
+ * Gets the namespace prefix.
+ */
+ readonly prefix: string | null;
+ /**
+ * Gets the local name.
+ */
+ readonly localName: string;
+ /**
+ * If namespace prefix is not `null`, returns the concatenation of
+ * namespace prefix, `":"`, and local name. Otherwise it returns the
+ * local name.
+ */
+ readonly name: string;
+ /**
+ * Gets or sets the attribute value.
+ */
+ value: string;
+ /**
+ * Gets the owner element node.
+ */
+ readonly ownerElement: Element | null;
+ /**
+ * Useless always returns true
+ */
+ readonly specified: boolean;
+ _namespace: string | null;
+ _namespacePrefix: string | null;
+ _localName: string;
+ _value: string;
+ _element: Element | null;
+ readonly _qualifiedName: string;
+}
+/**
+ * Represents a CDATA node.
+ */
+export interface CDATASection extends Text {
+}
+/**
+ * Represents a comment node.
+ */
+export interface Comment extends CharacterData {
+}
+/**
+ * Represents an object providing methods which are not dependent on
+ * any particular document
+ */
+export interface DOMImplementation {
+ createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;
+ /**
+ * Creates and returns an {@link XMLDocument}.
+ *
+ * @param namespace - the namespace of the document element
+ * @param qualifiedName - the qualified name of the document element
+ * @param doctype - a {@link DocType} to assign to this document
+ */
+ createDocument(namespace: string | null, qualifiedName: string, doctype?: DocumentType | null): XMLDocument;
+ /**
+ * Creates and returns a HTML document.
+ *
+ * @param title - document title
+ */
+ createHTMLDocument(title?: string): Document;
+ /**
+ * Obsolete, always returns true.
+ */
+ hasFeature(): boolean;
+ _ID: string;
+ _associatedDocument: Document;
+}
+/**
+ * Represents a token set.
+ */
+export interface DOMTokenList extends Iterable {
+ /**
+ * Returns the number of tokens.
+ */
+ readonly length: number;
+ /**
+ * Returns the token at the given index.
+ *
+ * @param index - the index to of the token
+ */
+ item(index: number): string | null;
+ /**
+ * Returns true if the set contains the given token.
+ *
+ * @param tokens - the token to check
+ */
+ contains(token: string): boolean;
+ /**
+ * Adds the given tokens to the set.
+ *
+ * @param tokens - the list of tokens to add
+ */
+ add(...tokens: string[]): void;
+ /**
+ * Removes the given tokens from the set.
+ *
+ * @param tokens - the list of tokens to remove
+ */
+ remove(...tokens: string[]): void;
+ /**
+ * Removes a given token from the set and returns `false` if it exists,
+ * otherwise adds the token and returns `true`.
+ *
+ * @param token - the token to toggle
+ * @param force - if `false` the token will only be removed but not
+ * added again otherwise if `true` the token will only be added but
+ * not removed again.
+ *
+ * @returns `false` if the token is not in the list after the call,
+ * or `true` if the token is in the list after the call.
+ */
+ toggle(token: string, force?: boolean | undefined): boolean;
+ /**
+ * Replaces the given token with a new token.
+ *
+ * @param token - the token to replace
+ * @param newToken - the new token
+ *
+ * @returns `true` if `token` was replaced with `newToken`,
+ * and `false` otherwise.
+ */
+ replace(token: string, newToken: string): boolean;
+ /**
+ * Determines if a given token is in the associated attribute's
+ * supported tokens
+ *
+ * @param token - the token to check
+ */
+ supports(token: string): boolean;
+ /**
+ * Gets the value of the token list as a string, or sets the token
+ * list to the given value.
+ */
+ value: string;
+ _tokenSet: Set;
+ _element: Element;
+ _attribute: Attr;
+}
+/**
+ * Represents a collection of attributes.
+ */
+export interface NamedNodeMap {
+ /**
+ * Returns the number of attribute in the collection.
+ */
+ readonly length: number;
+ /**
+ * Returns the attribute with index `index` from the collection.
+ *
+ * @param index - the zero-based index of the attribute to return
+ */
+ item(index: number): Attr | null;
+ /**
+ * Returns the attribute with the given `qualifiedName`.
+ *
+ * @param qualifiedName - qualified name to search for
+ */
+ getNamedItem(qualifiedName: string): Attr | null;
+ /**
+ * Returns the attribute with the given `namespace` and
+ * `qualifiedName`.
+ *
+ * @param namespace - namespace to search for
+ * @param localName - local name to search for
+ */
+ getNamedItemNS(namespace: string | null, localName: string): Attr | null;
+ /**
+ * Sets the attribute given with `attr`.
+ *
+ * @param attr - attribute to set
+ */
+ setNamedItem(attr: Attr): Attr | null;
+ /**
+ * Sets the attribute given with `attr`.
+ *
+ * @param attr - attribute to set
+ */
+ setNamedItemNS(attr: Attr): Attr | null;
+ /**
+ * Removes the attribute with the given `qualifiedName`.
+ *
+ * @param qualifiedName - qualified name to search for
+ */
+ removeNamedItem(qualifiedName: string): Attr;
+ /**
+ * Removes the attribute with the given `namespace` and
+ * `qualifiedName`.
+ *
+ * @param namespace - namespace to search for
+ * @param localName - local name to search for
+ */
+ removeNamedItemNS(namespace: string | null, localName: string): Attr;
+ /**
+ * Returns the attribute with index `index` from the collection. Returns
+ * `undefined` is index is out of bounds.
+ */
+ [index: number]: Attr;
+ /**
+ * Iterates over all attribute in the collection.
+ */
+ [Symbol.iterator](): IterableIterator;
+ _element: Element;
+ _asArray(): Array;
+}
+/**
+ * Represents a node filter.
+ */
+export interface NodeFilter {
+ FILTER_ACCEPT: number;
+ FILTER_REJECT: number;
+ FILTER_SKIP: number;
+ SHOW_ALL: number;
+ SHOW_ELEMENT: number;
+ SHOW_ATTRIBUTE: number;
+ SHOW_TEXT: number;
+ SHOW_CDATA_SECTION: number;
+ SHOW_ENTITY_REFERENCE: number;
+ SHOW_ENTITY: number;
+ SHOW_PROCESSING_INSTRUCTION: number;
+ SHOW_COMMENT: number;
+ SHOW_DOCUMENT: number;
+ SHOW_DOCUMENT_TYPE: number;
+ SHOW_DOCUMENT_FRAGMENT: number;
+ SHOW_NOTATION: number;
+ /**
+ * Callback function.
+ */
+ acceptNode(node: Node): FilterResult;
+}
+/**
+ * Represents a collection of nodes.
+ */
+export interface Collection {
+ _live: boolean;
+ _root: Node;
+ _filter: ((element: Element) => any) | null;
+}
+/**
+ * Represents an ordered list of nodes.
+ */
+export interface NodeList extends Collection, Iterable {
+ /**
+ * Returns the number of nodes in the list.
+ */
+ readonly length: number;
+ /**
+ * Returns an iterator for node indices.
+ */
+ keys(): Iterable;
+ /**
+ * Returns an iterator for nodes.
+ */
+ values(): Iterable;
+ /**
+ * Returns an iterator for indices and nodes.
+ */
+ entries(): Iterable<[number, Node]>;
+ /**
+ * Returns the node with index `index` from the collection.
+ *
+ * @param index - the zero-based index of the node to return
+ */
+ item(index: number): Node | null;
+ /**
+ * Returns the node at the given index from the collection. Returns `undefined`
+ * if the index is out-of-bounds.
+ */
+ [index: number]: Node | undefined;
+ /**
+ * Returns an iterator for the node list.
+ */
+ [Symbol.iterator](): Iterator;
+ /**
+ * Calls the callback function for each node in the list. The callback
+ * receives arguments as follows:
+ * - the current node
+ * - index of the current node
+ * - the node list object
+ *
+ * @param callback - function to execute for each node
+ * @param thisArg - value to use as `this` when executing callback
+ */
+ forEach(callback: (node: Node, index: number, list: NodeList) => any, thisArg?: any): void;
+ /**
+ * Used to keep track of child node count. This is a non-standard property.
+ */
+ _length: number;
+}
+/**
+ * Represents a mixin that extends child nodes that can have siblings
+ * other than doctypes. This mixin is implemented by {@link Element} and
+ * {@link CharacterData}.
+ */
+export interface NonDocumentTypeChildNode {
+ /**
+ * Returns the previous sibling that is an element node.
+ */
+ readonly previousElementSibling: Element | null;
+ /**
+ * Returns the next sibling that is an element node.
+ */
+ readonly nextElementSibling: Element | null;
+}
+/**
+ * Represents a processing instruction node.
+ */
+export interface ProcessingInstruction extends CharacterData {
+ /**
+ * Gets the target of the node.
+ */
+ readonly target: string;
+ _target: string;
+}
+/**
+ * Represents an object which can be used to traverse through the nodes
+ * of a subtree.
+ */
+export interface Traverser {
+ /**
+ * Gets the root node of the subtree.
+ */
+ readonly root: Node;
+ /**
+ * Gets the node types to match.
+ */
+ readonly whatToShow: WhatToShow;
+ /**
+ * Gets the filter used to selected the nodes.
+ */
+ readonly filter: NodeFilter | null;
+ _activeFlag: boolean;
+ _root: Node;
+ _whatToShow: WhatToShow;
+ _filter: NodeFilter | null;
+}
+/**
+ * Represents an object which can be used to iterate through the nodes
+ * of a subtree.
+ */
+export interface NodeIterator extends Traverser {
+ /**
+ * Gets the node current node of the.
+ */
+ readonly referenceNode: Node;
+ /**
+ * Gets a flag that indicates whether the iterator is anchored before
+ * or after the reference node. If is `true`, the iterator is anchored
+ * before the node, otherwise it is anchored after the node.
+ */
+ readonly pointerBeforeReferenceNode: boolean;
+ /**
+ * Returns the next node in the subtree, or `null` if there are none.
+ */
+ nextNode(): Node | null;
+ /**
+ * Returns the previous node in the subtree, or `null` if there
+ * are none.
+ */
+ previousNode(): Node | null;
+ /**
+ * Removes a range object from its owner document.
+ *
+ * _Note:_ According to the specification, this method is a no-op.
+ * However, since JavaScript lacks weak references, there is no reliable
+ * method of detecting out-of-scope variables. So, it is recommended to
+ * manually `detach` range objects after using them.
+ */
+ detach(): void;
+ _iteratorCollection: Collection;
+ _reference: Node;
+ _pointerBeforeReference: boolean;
+}
+/**
+ * Represents the nodes of a subtree and a position within them.
+ */
+export interface TreeWalker extends Traverser {
+ /**
+ * Gets or sets the node to which the iterator is pointing at.
+ */
+ currentNode: Node;
+ /**
+ * Moves the iterator to the first parent node of current node, and
+ * returns it. Returns `null` if no such node exists.
+ */
+ parentNode(): Node | null;
+ /**
+ * Moves the iterator to the first child node of current node, and
+ * returns it. Returns `null` if no such node exists.
+ */
+ firstChild(): Node | null;
+ /**
+ * Moves the iterator to the last child node of current node, and
+ * returns it. Returns `null` if no such node exists.
+ */
+ lastChild(): Node | null;
+ /**
+ * Moves the iterator to the next sibling of current node, and
+ * returns it. Returns `null` if no such node exists.
+ */
+ nextSibling(): Node | null;
+ /**
+ * Moves the iterator to the previous sibling of current node, and
+ * returns it. Returns `null` if no such node exists.
+ */
+ previousSibling(): Node | null;
+ /**
+ * Returns the next node in the subtree, or `null` if there are none.
+ */
+ nextNode(): Node | null;
+ /**
+ * Returns the previous node in the subtree, or `null` if there
+ * are none.
+ */
+ previousNode(): Node | null;
+ _current: Node;
+}
+/**
+ * Represents an abstract range with a start and end boundary point.
+ */
+export interface AbstractRange {
+ /**
+ * Returns the start node of the range.
+ */
+ readonly startContainer: Node;
+ /**
+ * Returns the start offset of the range.
+ */
+ readonly startOffset: number;
+ /**
+ * Returns the end node of the range.
+ */
+ readonly endContainer: Node;
+ /**
+ * Returns the end offest of the range.
+ */
+ readonly endOffset: number;
+ /**
+ * Returns `true` if the range starts and ends at the same point.
+ */
+ readonly collapsed: boolean;
+ _start: BoundaryPoint;
+ _end: BoundaryPoint;
+ readonly _startNode: Node;
+ readonly _startOffset: number;
+ readonly _endNode: Node;
+ readonly _endOffset: number;
+ readonly _collapsed: boolean;
+}
+/**
+ * Represents a static range.
+ */
+export interface StaticRange extends AbstractRange {
+}
+/**
+ * Represents a live range.
+ */
+export interface Range extends AbstractRange {
+ START_TO_START: number;
+ START_TO_END: number;
+ END_TO_END: number;
+ END_TO_START: number;
+ /**
+ * Returns the node, furthest away from the document, that is an
+ * ancestor of both range's start node and end node.
+ */
+ readonly commonAncestorContainer: Node;
+ /**
+ * Sets the start of the range to the given boundary point.
+ *
+ * @param node - node of the boundary point
+ * @param offset - offset of the boundary point along node's content
+ */
+ setStart(node: Node, offset: number): void;
+ /**
+ * Sets the end of the range to the given boundary point.
+ *
+ * @param node - node of the boundary point
+ * @param offset - offset of the boundary point along node's content
+ */
+ setEnd(node: Node, offset: number): void;
+ /**
+ * Sets the start of the range to just before the given node.
+ *
+ * @param node - node of the boundary point
+ */
+ setStartBefore(node: Node): void;
+ /**
+ * Sets the start of the range to just after the given node.
+ *
+ * @param node - node of the boundary point
+ */
+ setStartAfter(node: Node): void;
+ /**
+ * Sets the end of the range to just before the given node.
+ *
+ * @param node - node of the boundary point
+ */
+ setEndBefore(node: Node): void;
+ /**
+ * Sets the end of the range to just after the given node.
+ *
+ * @param node - node of the boundary point
+ */
+ setEndAfter(node: Node): void;
+ /**
+ * Collapses the range.
+ *
+ * @param toStart - `true` to collapse to start node, otherwise
+ * `false` to collapse to the end node.
+ */
+ collapse(toStart?: boolean): void;
+ /**
+ * Sets the range to contain the given node.
+ *
+ * @param node - the range to select
+ */
+ selectNode(node: Node): void;
+ /**
+ * Sets the range to contain the given node's contens.
+ *
+ * @param node - the range to select
+ */
+ selectNodeContents(node: Node): void;
+ /**
+ * Compares the boundary points of this range with another one.
+ *
+ * @param how - comparison method:
+ * * `EndToEnd` - compares the end boundary-point of `sourceRange` to the end
+ * boundary-point of this range.
+ * * `EndToStart` - compares the end boundary-point of `sourceRange` to the
+ * start boundary-point of this range.
+ * * `StartToEnd` - compares the start boundary-point of `sourceRange` to the
+ * end boundary-point of this range.
+ * * `StartToStart` - compares the start boundary-point of `sourceRange` to
+ * the start boundary-point of this range.
+ * @param sourceRange - the range to compare to
+ *
+ * @returns a number depending on boundaries of ranges relative to each other:
+ * * `-1` if the corresponding boundary point of this is range comes before
+ * that of `sourceRange`
+ * * `1` if the corresponding boundary point of this is range comes after
+ * that of `sourceRange`
+ * * `0` if corresponding boundary points of both ranges are equal
+ */
+ compareBoundaryPoints(how: HowToCompare, sourceRange: Range): number;
+ /**
+ * Removes the contents of the range from the tree.
+ */
+ deleteContents(): void;
+ /**
+ * Moves the contents of the range to a document fragment.
+ */
+ extractContents(): DocumentFragment;
+ /**
+ * Copies the contents of the range to a document fragment.
+ */
+ cloneContents(): DocumentFragment;
+ /**
+ * Inserts a node at the start boundary point.
+ *
+ * @param node - the node to insert
+ */
+ insertNode(node: Node): void;
+ /**
+ * Moves content of the Range into a new node, placing the new node
+ * at the start of the range.
+ *
+ * @param newParent - a node to receive range's content
+ */
+ surroundContents(newParent: Node): void;
+ /**
+ * Creates a new range with identical boundary points.
+ */
+ cloneRange(): Range;
+ /**
+ * Unused method. Kept for compatibility.
+ */
+ detach(): void;
+ /**
+ * Determines whether the range contains the given boundary point.
+ *
+ * @param node - the node of the boundary point
+ * @param offset - the offset of the boundary point
+ */
+ isPointInRange(node: Node, offset: number): boolean;
+ /**
+ * Returns `-1`, `0`, or `1` depending on whether `node` is
+ * before, the same as, or after the range.
+ *
+ * @param node - the node to compare
+ * @param offset - an offset within node
+ */
+ comparePoint(node: Node, offset: number): number;
+ /**
+ * Determines whether the given node intersects the range.
+ *
+ * @param node - the node to check
+ */
+ intersectsNode(node: Node): boolean;
+}
+/**
+* Represents a html element node.
+*/
+export interface HTMLElement extends Element {
+}
+/**
+ * Represents a `` element.
+ */
+export interface HTMLSlotElement extends HTMLElement {
+}
+/**
+ * Defines the position of a boundary point relative to another.
+ */
+export declare enum BoundaryPosition {
+ Before = 0,
+ Equal = 1,
+ After = 2
+}
+/**
+ * Defines the event phase.
+ */
+export declare enum EventPhase {
+ None = 0,
+ Capturing = 1,
+ AtTarget = 2,
+ Bubbling = 3
+}
+/**
+ * Defines the type of a node object.
+ */
+export declare enum NodeType {
+ Element = 1,
+ Attribute = 2,
+ Text = 3,
+ CData = 4,
+ EntityReference = 5,
+ Entity = 6,
+ ProcessingInstruction = 7,
+ Comment = 8,
+ Document = 9,
+ DocumentType = 10,
+ DocumentFragment = 11,
+ Notation = 12
+}
+/**
+ * Defines the position of a node in the document relative to another
+ * node.
+ */
+export declare enum Position {
+ Disconnected = 1,
+ Preceding = 2,
+ Following = 4,
+ Contains = 8,
+ ContainedBy = 16,
+ ImplementationSpecific = 32
+}
+/**
+ * Defines the return value of a filter callback.
+ */
+export declare enum FilterResult {
+ Accept = 1,
+ Reject = 2,
+ Skip = 3
+}
+/**
+ * Defines what to show in node filter.
+ */
+export declare enum WhatToShow {
+ All = 4294967295,
+ Element = 1,
+ Attribute = 2,
+ Text = 4,
+ CDataSection = 8,
+ EntityReference = 16,
+ Entity = 32,
+ ProcessingInstruction = 64,
+ Comment = 128,
+ Document = 256,
+ DocumentType = 512,
+ DocumentFragment = 1024,
+ Notation = 2048
+}
+/**
+ * Defines how boundary points are compared.
+ */
+export declare enum HowToCompare {
+ StartToStart = 0,
+ StartToEnd = 1,
+ EndToEnd = 2,
+ EndToStart = 3
+}
+/**
+ * Represents settings for the getRootNode() function.
+ */
+export interface GetRootNodeOptions {
+ composed?: boolean;
+}
+/**
+ * Represents event initialization options.
+ */
+export interface EventInit {
+ bubbles?: boolean;
+ cancelable?: boolean;
+ composed?: boolean;
+}
+/**
+ * Represents custom event initialization options.
+ */
+export interface CustomEventInit extends EventInit {
+ detail?: any;
+}
+/**
+ * Defines event listener options.
+ */
+export interface EventListenerOptions {
+ capture?: boolean;
+}
+/**
+ * Defines options for the `addEventListener` function.
+ */
+export interface AddEventListenerOptions extends EventListenerOptions {
+ passive?: boolean;
+ once?: boolean;
+}
+/**
+ * Defines the criteria for the mutations to observe.
+ */
+export interface MutationObserverInit {
+ childList?: boolean;
+ attributes?: boolean;
+ characterData?: boolean;
+ subtree?: boolean;
+ attributeOldValue?: boolean;
+ characterDataOldValue?: boolean;
+ attributeFilter?: string[];
+}
+/**
+ * Defines an entry in the event listeners list.
+ */
+export declare type EventListenerEntry = {
+ type: string;
+ callback: EventListener;
+ capture: boolean;
+ passive: boolean;
+ once: boolean;
+ removed: boolean;
+};
+/**
+ * Defines a non-null event handler.
+ */
+export declare type EventHandlerNonNull = ((event: Event) => any);
+/**
+ * Defines an event handler.
+ */
+export declare type EventHandler = EventHandlerNonNull | null;
+/**
+ * Defines a struct containing an event handler.
+ */
+export declare type EventHandlerEntry = {
+ value: EventHandler;
+ listener: EventListenerEntry | null;
+};
+/**
+ * Defines static range constructor parameters.
+ */
+export declare type StaticRangeInit = {
+ startContainer: Node;
+ startOffset: number;
+ endContainer: Node;
+ endOffset: number;
+};
+/**
+ * Defines a boundary point which is a tuple consisting of a node and an offset
+ * into the node's contents.
+ */
+export declare type BoundaryPoint = [Node, number];
+/**
+ * Defines a callback function which is invoked after nodes registered with the
+ * observe() method, are mutated.
+ *
+ * @param mutations - a list of `MutationRecord` objects
+ * @param observer - the constructed `MutationObserver` object
+ */
+export declare type MutationCallback = (mutations: MutationRecord[], observer: MutationObserver) => void;
+/**
+ * Represents a registered observer associated with a node.
+ */
+export declare type RegisteredObserver = {
+ observer: MutationObserver;
+ options: MutationObserverInit;
+};
+/**
+ * Represents a transient registered observer associated with a node.
+ * Transient registered observers are used to track mutations within a given
+ * node's descendants after node has been removed so they do not get lost when
+ * subtree is set to true on node's parent.
+ */
+export declare type TransientRegisteredObserver = RegisteredObserver & {
+ source: RegisteredObserver;
+};
+/**
+ * Defines the mode of a shadow root.
+ */
+export declare type ShadowRootMode = 'open' | 'closed';
+/**
+ * Represents a potential event target.
+ */
+export declare type PotentialEventTarget = EventTarget | null;
+/**
+ * Represents an object on the event path.
+ */
+export declare type EventPathItem = {
+ invocationTarget: EventTarget;
+ invocationTargetInShadowTree: boolean;
+ shadowAdjustedTarget: PotentialEventTarget;
+ relatedTarget: PotentialEventTarget;
+ touchTargetList: PotentialEventTarget[];
+ rootOfClosedTree: boolean;
+ slotInClosedTree: boolean;
+};
+/**
+ * Represents a document origin.
+ * `null` represents an opaque origin.
+ */
+export declare type Origin = null | [string, // scheme
+// scheme
+string | number | number[], // host
+// host
+null | number, // port
+// port
+null | string];
+/**
+ * Represents a `` element.
+ */
+export interface HTMLSlotElement {
+ name: string;
+ assignedNodes(options?: any): Node[];
+ assignedElements(options?: any): Element[];
+}
+/**
+ * Represents a `UIEvent`.
+ */
+export interface UIEvent extends Event {
+ readonly view?: Window;
+ readonly detail: number;
+}
+/**
+ * Represents a `MouseEvent`.
+ */
+export interface MouseEvent extends UIEvent {
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly ctrlKey: boolean;
+ readonly shiftKey: boolean;
+ readonly altKey: boolean;
+ readonly metaKey: boolean;
+ readonly button: number;
+ readonly buttons: number;
+ readonly relatedTarget?: EventTarget;
+ getModifierState(keyArg: string): boolean;
+}
+/**
+ * Represents a custom element definition.
+ */
+export declare type CustomElementDefinition = {
+ name: string;
+ localName: string;
+ constructor: (new (...args: any[]) => Element);
+ observedAttributes: string[];
+ lifecycleCallbacks: {
+ "connectedCallback": ((args: any[]) => any) | null;
+ "disconnectedCallback": ((args: any[]) => any) | null;
+ "adoptedCallback": ((args: any) => any[]) | null;
+ "attributeChangedCallback": ((args: any[]) => any) | null;
+ "formAssociatedCallback": ((args: any[]) => any) | null;
+ "formDisabledCallback": ((args: any[]) => any) | null;
+ "formResetCallback": ((args: any[]) => any) | null;
+ "formStateRestoreCallback": ((args: any[]) => any) | null;
+ };
+ constructionStack: (Element | boolean)[];
+ formAssociated: boolean;
+ disableInternals: boolean;
+ disableShadow: boolean;
+};
+/**
+ * Defines an attribute change step.
+ */
+export declare type AttributeChangeStep = ((element: Element, localName: string, oldValue: string | null, value: string | null, namespace: string | null) => any);
diff --git a/node_modules/@oozcitak/dom/lib/dom/interfaces.js b/node_modules/@oozcitak/dom/lib/dom/interfaces.js
new file mode 100644
index 0000000..2faf599
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/interfaces.js
@@ -0,0 +1,91 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Defines the position of a boundary point relative to another.
+ */
+var BoundaryPosition;
+(function (BoundaryPosition) {
+ BoundaryPosition[BoundaryPosition["Before"] = 0] = "Before";
+ BoundaryPosition[BoundaryPosition["Equal"] = 1] = "Equal";
+ BoundaryPosition[BoundaryPosition["After"] = 2] = "After";
+})(BoundaryPosition = exports.BoundaryPosition || (exports.BoundaryPosition = {}));
+/**
+ * Defines the event phase.
+ */
+var EventPhase;
+(function (EventPhase) {
+ EventPhase[EventPhase["None"] = 0] = "None";
+ EventPhase[EventPhase["Capturing"] = 1] = "Capturing";
+ EventPhase[EventPhase["AtTarget"] = 2] = "AtTarget";
+ EventPhase[EventPhase["Bubbling"] = 3] = "Bubbling";
+})(EventPhase = exports.EventPhase || (exports.EventPhase = {}));
+/**
+ * Defines the type of a node object.
+ */
+var NodeType;
+(function (NodeType) {
+ NodeType[NodeType["Element"] = 1] = "Element";
+ NodeType[NodeType["Attribute"] = 2] = "Attribute";
+ NodeType[NodeType["Text"] = 3] = "Text";
+ NodeType[NodeType["CData"] = 4] = "CData";
+ NodeType[NodeType["EntityReference"] = 5] = "EntityReference";
+ NodeType[NodeType["Entity"] = 6] = "Entity";
+ NodeType[NodeType["ProcessingInstruction"] = 7] = "ProcessingInstruction";
+ NodeType[NodeType["Comment"] = 8] = "Comment";
+ NodeType[NodeType["Document"] = 9] = "Document";
+ NodeType[NodeType["DocumentType"] = 10] = "DocumentType";
+ NodeType[NodeType["DocumentFragment"] = 11] = "DocumentFragment";
+ NodeType[NodeType["Notation"] = 12] = "Notation"; // historical
+})(NodeType = exports.NodeType || (exports.NodeType = {}));
+/**
+ * Defines the position of a node in the document relative to another
+ * node.
+ */
+var Position;
+(function (Position) {
+ Position[Position["Disconnected"] = 1] = "Disconnected";
+ Position[Position["Preceding"] = 2] = "Preceding";
+ Position[Position["Following"] = 4] = "Following";
+ Position[Position["Contains"] = 8] = "Contains";
+ Position[Position["ContainedBy"] = 16] = "ContainedBy";
+ Position[Position["ImplementationSpecific"] = 32] = "ImplementationSpecific";
+})(Position = exports.Position || (exports.Position = {}));
+/**
+ * Defines the return value of a filter callback.
+ */
+var FilterResult;
+(function (FilterResult) {
+ FilterResult[FilterResult["Accept"] = 1] = "Accept";
+ FilterResult[FilterResult["Reject"] = 2] = "Reject";
+ FilterResult[FilterResult["Skip"] = 3] = "Skip";
+})(FilterResult = exports.FilterResult || (exports.FilterResult = {}));
+/**
+ * Defines what to show in node filter.
+ */
+var WhatToShow;
+(function (WhatToShow) {
+ WhatToShow[WhatToShow["All"] = 4294967295] = "All";
+ WhatToShow[WhatToShow["Element"] = 1] = "Element";
+ WhatToShow[WhatToShow["Attribute"] = 2] = "Attribute";
+ WhatToShow[WhatToShow["Text"] = 4] = "Text";
+ WhatToShow[WhatToShow["CDataSection"] = 8] = "CDataSection";
+ WhatToShow[WhatToShow["EntityReference"] = 16] = "EntityReference";
+ WhatToShow[WhatToShow["Entity"] = 32] = "Entity";
+ WhatToShow[WhatToShow["ProcessingInstruction"] = 64] = "ProcessingInstruction";
+ WhatToShow[WhatToShow["Comment"] = 128] = "Comment";
+ WhatToShow[WhatToShow["Document"] = 256] = "Document";
+ WhatToShow[WhatToShow["DocumentType"] = 512] = "DocumentType";
+ WhatToShow[WhatToShow["DocumentFragment"] = 1024] = "DocumentFragment";
+ WhatToShow[WhatToShow["Notation"] = 2048] = "Notation";
+})(WhatToShow = exports.WhatToShow || (exports.WhatToShow = {}));
+/**
+ * Defines how boundary points are compared.
+ */
+var HowToCompare;
+(function (HowToCompare) {
+ HowToCompare[HowToCompare["StartToStart"] = 0] = "StartToStart";
+ HowToCompare[HowToCompare["StartToEnd"] = 1] = "StartToEnd";
+ HowToCompare[HowToCompare["EndToEnd"] = 2] = "EndToEnd";
+ HowToCompare[HowToCompare["EndToStart"] = 3] = "EndToStart";
+})(HowToCompare = exports.HowToCompare || (exports.HowToCompare = {}));
+//# sourceMappingURL=interfaces.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/dom/interfaces.js.map b/node_modules/@oozcitak/dom/lib/dom/interfaces.js.map
new file mode 100644
index 0000000..c2b17b0
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/dom/interfaces.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/dom/interfaces.ts"],"names":[],"mappings":";;AA6uEA;;GAEG;AACH,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,2DAAM,CAAA;IACN,yDAAK,CAAA;IACL,yDAAK,CAAA;AACP,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAED;;GAEG;AACH,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,2CAAQ,CAAA;IACR,qDAAa,CAAA;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WAAY,YAAY;IACtB,+DAAgB,CAAA;IAChB,2DAAc,CAAA;IACd,uDAAY,CAAA;IACZ,2DAAc,CAAA;AAChB,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/index.d.ts b/node_modules/@oozcitak/dom/lib/index.d.ts
new file mode 100644
index 0000000..bf2f5f7
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/index.d.ts
@@ -0,0 +1,3 @@
+export { DOMImplementation } from "./dom";
+export { DOMParser } from "./parser";
+export { XMLSerializer } from "./serializer";
diff --git a/node_modules/@oozcitak/dom/lib/index.js b/node_modules/@oozcitak/dom/lib/index.js
new file mode 100644
index 0000000..87d3b00
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/index.js
@@ -0,0 +1,11 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var dom_1 = require("./dom");
+dom_1.dom.setFeatures(true);
+var dom_2 = require("./dom");
+exports.DOMImplementation = dom_2.DOMImplementation;
+var parser_1 = require("./parser");
+exports.DOMParser = parser_1.DOMParser;
+var serializer_1 = require("./serializer");
+exports.XMLSerializer = serializer_1.XMLSerializer;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/index.js.map b/node_modules/@oozcitak/dom/lib/index.js.map
new file mode 100644
index 0000000..d3844e3
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,6BAA2B;AAC3B,SAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;AAErB,6BAAyC;AAAhC,kCAAA,iBAAiB,CAAA;AAC1B,mCAAoC;AAA3B,6BAAA,SAAS,CAAA;AAClB,2CAA4C;AAAnC,qCAAA,aAAa,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.d.ts b/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.d.ts
new file mode 100644
index 0000000..ebdae73
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.d.ts
@@ -0,0 +1,11 @@
+import { DOMParser, MimeType } from "./interfaces";
+import { Document } from "../dom/interfaces";
+/**
+ * Represents a parser for XML and HTML content.
+ *
+ * See: https://w3c.github.io/DOM-Parsing/#the-domparser-interface
+ */
+export declare class DOMParserImpl implements DOMParser {
+ /** @inheritdoc */
+ parseFromString(source: string, mimeType: MimeType): Document;
+}
diff --git a/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js b/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js
new file mode 100644
index 0000000..641ac57
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js
@@ -0,0 +1,37 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var algorithm_1 = require("../algorithm");
+var XMLParserImpl_1 = require("./XMLParserImpl");
+/**
+ * Represents a parser for XML and HTML content.
+ *
+ * See: https://w3c.github.io/DOM-Parsing/#the-domparser-interface
+ */
+var DOMParserImpl = /** @class */ (function () {
+ function DOMParserImpl() {
+ }
+ /** @inheritdoc */
+ DOMParserImpl.prototype.parseFromString = function (source, mimeType) {
+ if (mimeType === "text/html")
+ throw new Error('HTML parser not implemented.');
+ try {
+ var parser = new XMLParserImpl_1.XMLParserImpl();
+ var doc = parser.parse(source);
+ doc._contentType = mimeType;
+ return doc;
+ }
+ catch (e) {
+ var errorNS = "http://www.mozilla.org/newlayout/xml/parsererror.xml";
+ var doc = algorithm_1.create_xmlDocument();
+ var root = doc.createElementNS(errorNS, "parsererror");
+ var ele = doc.createElementNS(errorNS, "error");
+ ele.setAttribute("message", e.message);
+ root.appendChild(ele);
+ doc.appendChild(root);
+ return doc;
+ }
+ };
+ return DOMParserImpl;
+}());
+exports.DOMParserImpl = DOMParserImpl;
+//# sourceMappingURL=DOMParserImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js.map b/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js.map
new file mode 100644
index 0000000..36192a8
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"DOMParserImpl.js","sourceRoot":"","sources":["../../src/parser/DOMParserImpl.ts"],"names":[],"mappings":";;AAEA,0CAAiD;AACjD,iDAA+C;AAE/C;;;;GAIG;AACH;IAAA;IAuBA,CAAC;IArBC,kBAAkB;IAClB,uCAAe,GAAf,UAAgB,MAAc,EAAE,QAAkB;QAChD,IAAI,QAAQ,KAAK,WAAW;YAC1B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAA;QAEjD,IAAI;YACF,IAAM,MAAM,GAAG,IAAI,6BAAa,EAAE,CAAA;YAClC,IAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;YAChC,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAA;YAC3B,OAAO,GAAG,CAAA;SACX;QAAC,OAAO,CAAC,EAAE;YACV,IAAM,OAAO,GAAG,sDAAsD,CAAA;YACtE,IAAM,GAAG,GAAG,8BAAkB,EAAE,CAAA;YAChC,IAAM,IAAI,GAAG,GAAG,CAAC,eAAe,CAAC,OAAO,EAAE,aAAa,CAAC,CAAA;YACxD,IAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;YACjD,GAAG,CAAC,YAAY,CAAC,SAAS,EAAG,CAAW,CAAC,OAAO,CAAC,CAAA;YACjD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;YACrB,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;YACrB,OAAO,GAAG,CAAA;SACX;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAvBD,IAuBC;AAvBY,sCAAa"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.d.ts b/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.d.ts
new file mode 100644
index 0000000..ea110a7
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.d.ts
@@ -0,0 +1,14 @@
+import { Document } from "../dom/interfaces";
+/**
+ * Represents a parser for XML content.
+ *
+ * See: https://html.spec.whatwg.org/#xml-parser
+ */
+export declare class XMLParserImpl {
+ /**
+ * Parses XML content.
+ *
+ * @param source - a string containing XML content
+ */
+ parse(source: string): Document;
+}
diff --git a/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js b/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js
new file mode 100644
index 0000000..44d1fa1
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js
@@ -0,0 +1,220 @@
+"use strict";
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var XMLStringLexer_1 = require("./XMLStringLexer");
+var interfaces_1 = require("./interfaces");
+var infra_1 = require("@oozcitak/infra");
+var algorithm_1 = require("../algorithm");
+var LocalNameSet_1 = require("../serializer/LocalNameSet");
+/**
+ * Represents a parser for XML content.
+ *
+ * See: https://html.spec.whatwg.org/#xml-parser
+ */
+var XMLParserImpl = /** @class */ (function () {
+ function XMLParserImpl() {
+ }
+ /**
+ * Parses XML content.
+ *
+ * @param source - a string containing XML content
+ */
+ XMLParserImpl.prototype.parse = function (source) {
+ var e_1, _a, e_2, _b;
+ var lexer = new XMLStringLexer_1.XMLStringLexer(source, { skipWhitespaceOnlyText: true });
+ var doc = algorithm_1.create_document();
+ var context = doc;
+ var token = lexer.nextToken();
+ while (token.type !== interfaces_1.TokenType.EOF) {
+ switch (token.type) {
+ case interfaces_1.TokenType.Declaration:
+ var declaration = token;
+ if (declaration.version !== "1.0") {
+ throw new Error("Invalid xml version: " + declaration.version);
+ }
+ break;
+ case interfaces_1.TokenType.DocType:
+ var doctype = token;
+ if (!algorithm_1.xml_isPubidChar(doctype.pubId)) {
+ throw new Error("DocType public identifier does not match PubidChar construct.");
+ }
+ if (!algorithm_1.xml_isLegalChar(doctype.sysId) ||
+ (doctype.sysId.indexOf('"') !== -1 && doctype.sysId.indexOf("'") !== -1)) {
+ throw new Error("DocType system identifier contains invalid characters.");
+ }
+ context.appendChild(doc.implementation.createDocumentType(doctype.name, doctype.pubId, doctype.sysId));
+ break;
+ case interfaces_1.TokenType.CDATA:
+ var cdata = token;
+ if (!algorithm_1.xml_isLegalChar(cdata.data) ||
+ cdata.data.indexOf("]]>") !== -1) {
+ throw new Error("CDATA contains invalid characters.");
+ }
+ context.appendChild(doc.createCDATASection(cdata.data));
+ break;
+ case interfaces_1.TokenType.Comment:
+ var comment = token;
+ if (!algorithm_1.xml_isLegalChar(comment.data) ||
+ comment.data.indexOf("--") !== -1 || comment.data.endsWith("-")) {
+ throw new Error("Comment data contains invalid characters.");
+ }
+ context.appendChild(doc.createComment(comment.data));
+ break;
+ case interfaces_1.TokenType.PI:
+ var pi = token;
+ if (pi.target.indexOf(":") !== -1 || (/^xml$/i).test(pi.target)) {
+ throw new Error("Processing instruction target contains invalid characters.");
+ }
+ if (!algorithm_1.xml_isLegalChar(pi.data) || pi.data.indexOf("?>") !== -1) {
+ throw new Error("Processing instruction data contains invalid characters.");
+ }
+ context.appendChild(doc.createProcessingInstruction(pi.target, pi.data));
+ break;
+ case interfaces_1.TokenType.Text:
+ var text = token;
+ if (!algorithm_1.xml_isLegalChar(text.data)) {
+ throw new Error("Text data contains invalid characters.");
+ }
+ context.appendChild(doc.createTextNode(text.data));
+ break;
+ case interfaces_1.TokenType.Element:
+ var element = token;
+ // inherit namespace from parent
+ var _c = __read(algorithm_1.namespace_extractQName(element.name), 2), prefix = _c[0], localName = _c[1];
+ if (localName.indexOf(":") !== -1 || !algorithm_1.xml_isName(localName)) {
+ throw new Error("Node local name contains invalid characters.");
+ }
+ if (prefix === "xmlns") {
+ throw new Error("An element cannot have the 'xmlns' prefix.");
+ }
+ var namespace = context.lookupNamespaceURI(prefix);
+ // override namespace if there is a namespace declaration
+ // attribute
+ // also lookup namespace declaration attributes
+ var nsDeclarations = {};
+ try {
+ for (var _d = (e_1 = void 0, __values(element.attributes)), _e = _d.next(); !_e.done; _e = _d.next()) {
+ var _f = __read(_e.value, 2), attName = _f[0], attValue = _f[1];
+ if (attName === "xmlns") {
+ namespace = attValue;
+ }
+ else {
+ var _g = __read(algorithm_1.namespace_extractQName(attName), 2), attPrefix = _g[0], attLocalName = _g[1];
+ if (attPrefix === "xmlns") {
+ if (attLocalName === prefix) {
+ namespace = attValue;
+ }
+ nsDeclarations[attLocalName] = attValue;
+ }
+ }
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ // create the DOM element node
+ var elementNode = (namespace !== null ?
+ doc.createElementNS(namespace, element.name) :
+ doc.createElement(element.name));
+ context.appendChild(elementNode);
+ // assign attributes
+ var localNameSet = new LocalNameSet_1.LocalNameSet();
+ try {
+ for (var _h = (e_2 = void 0, __values(element.attributes)), _j = _h.next(); !_j.done; _j = _h.next()) {
+ var _k = __read(_j.value, 2), attName = _k[0], attValue = _k[1];
+ var _l = __read(algorithm_1.namespace_extractQName(attName), 2), attPrefix = _l[0], attLocalName = _l[1];
+ var attNamespace = null;
+ if (attPrefix === "xmlns" || (attPrefix === null && attLocalName === "xmlns")) {
+ // namespace declaration attribute
+ attNamespace = infra_1.namespace.XMLNS;
+ }
+ else {
+ attNamespace = elementNode.lookupNamespaceURI(attPrefix);
+ if (attNamespace !== null && elementNode.isDefaultNamespace(attNamespace)) {
+ attNamespace = null;
+ }
+ else if (attNamespace === null && attPrefix !== null) {
+ attNamespace = nsDeclarations[attPrefix] || null;
+ }
+ }
+ if (localNameSet.has(attNamespace, attLocalName)) {
+ throw new Error("Element contains duplicate attributes.");
+ }
+ localNameSet.set(attNamespace, attLocalName);
+ if (attNamespace === infra_1.namespace.XMLNS) {
+ if (attValue === infra_1.namespace.XMLNS) {
+ throw new Error("XMLNS namespace is reserved.");
+ }
+ }
+ if (attLocalName.indexOf(":") !== -1 || !algorithm_1.xml_isName(attLocalName)) {
+ throw new Error("Attribute local name contains invalid characters.");
+ }
+ if (attPrefix === "xmlns" && attValue === "") {
+ throw new Error("Empty XML namespace is not allowed.");
+ }
+ if (attNamespace !== null)
+ elementNode.setAttributeNS(attNamespace, attName, attValue);
+ else
+ elementNode.setAttribute(attName, attValue);
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (_j && !_j.done && (_b = _h.return)) _b.call(_h);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ if (!element.selfClosing) {
+ context = elementNode;
+ }
+ break;
+ case interfaces_1.TokenType.ClosingTag:
+ var closingTag = token;
+ if (closingTag.name !== context.nodeName) {
+ throw new Error('Closing tag name does not match opening tag name.');
+ }
+ /* istanbul ignore else */
+ if (context._parent) {
+ context = context._parent;
+ }
+ break;
+ }
+ token = lexer.nextToken();
+ }
+ return doc;
+ };
+ return XMLParserImpl;
+}());
+exports.XMLParserImpl = XMLParserImpl;
+//# sourceMappingURL=XMLParserImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js.map b/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js.map
new file mode 100644
index 0000000..1ca9b74
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"XMLParserImpl.js","sourceRoot":"","sources":["../../src/parser/XMLParserImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAiD;AACjD,2CAA0D;AAM1D,yCAA6D;AAC7D,0CAGqB;AACrB,2DAAyD;AAEzD;;;;GAIG;AACH;IAAA;IAsKA,CAAC;IApKC;;;;OAIG;IACH,6BAAK,GAAL,UAAM,MAAc;;QAClB,IAAM,KAAK,GAAG,IAAI,+BAAc,CAAC,MAAM,EAAE,EAAE,sBAAsB,EAAE,IAAI,EAAE,CAAC,CAAA;QAE1E,IAAM,GAAG,GAAG,2BAAe,EAAE,CAAA;QAE7B,IAAI,OAAO,GAAS,GAAG,CAAA;QACvB,IAAI,KAAK,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;QAC7B,OAAO,KAAK,CAAC,IAAI,KAAK,sBAAS,CAAC,GAAG,EAAE;YACnC,QAAQ,KAAK,CAAC,IAAI,EAAE;gBAClB,KAAK,sBAAS,CAAC,WAAW;oBACxB,IAAM,WAAW,GAAqB,KAAK,CAAA;oBAC3C,IAAI,WAAW,CAAC,OAAO,KAAK,KAAK,EAAE;wBACjC,MAAM,IAAI,KAAK,CAAC,uBAAuB,GAAG,WAAW,CAAC,OAAO,CAAC,CAAA;qBAC/D;oBACD,MAAK;gBACP,KAAK,sBAAS,CAAC,OAAO;oBACpB,IAAM,OAAO,GAAiB,KAAK,CAAA;oBACnC,IAAI,CAAC,2BAAe,CAAC,OAAO,CAAC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C,qCAAqC,CAAC,CAAA;6BACvD;4BAED,IAAI,YAAY,KAAK,IAAI;gCACvB,WAAW,CAAC,cAAc,CAAC,YAAY,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAA;;gCAE3D,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;yBAC9C;;;;;;;;;oBAED,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;wBACxB,OAAO,GAAS,WAAW,CAAA;qBAC5B;oBACD,MAAK;gBACP,KAAK,sBAAS,CAAC,UAAU;oBACvB,IAAM,UAAU,GAAoB,KAAK,CAAA;oBACzC,IAAI,UAAU,CAAC,IAAI,KAAK,OAAO,CAAC,QAAQ,EAAE;wBACxC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;qBACrE;oBACD,0BAA0B;oBAC1B,IAAI,OAAO,CAAC,OAAO,EAAE;wBACnB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;qBAC1B;oBACD,MAAK;aACR;YAED,KAAK,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;SAC1B;QACD,OAAO,GAAG,CAAA;IACZ,CAAC;IACH,oBAAC;AAAD,CAAC,AAtKD,IAsKC;AAtKY,sCAAa"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.d.ts b/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.d.ts
new file mode 100644
index 0000000..256d77c
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.d.ts
@@ -0,0 +1,159 @@
+import { XMLToken, XMLLexer, XMLLexerOptions } from "./interfaces";
+/**
+ * Represents a lexer for XML content in a string.
+ */
+export declare class XMLStringLexer implements XMLLexer {
+ private _str;
+ private _index;
+ private _length;
+ private _options;
+ err: {
+ line: number;
+ col: number;
+ index: number;
+ str: string;
+ };
+ /**
+ * Initializes a new instance of `XMLStringLexer`.
+ *
+ * @param str - the string to tokenize and lex
+ * @param options - lexer options
+ */
+ constructor(str: string, options?: Partial);
+ /**
+ * Returns the next token.
+ */
+ nextToken(): XMLToken;
+ /**
+ * Branches from an opening bracket (`<`).
+ */
+ private openBracket;
+ /**
+ * Produces an XML declaration token.
+ */
+ private declaration;
+ /**
+ * Produces a doc type token.
+ */
+ private doctype;
+ /**
+ * Produces a processing instruction token.
+ */
+ private pi;
+ /**
+ * Produces a text token.
+ *
+ */
+ private text;
+ /**
+ * Produces a comment token.
+ *
+ */
+ private comment;
+ /**
+ * Produces a CDATA token.
+ *
+ */
+ private cdata;
+ /**
+ * Produces an element token.
+ */
+ private openTag;
+ /**
+ * Produces a closing tag token.
+ *
+ */
+ private closeTag;
+ /**
+ * Reads an attribute name, value pair
+ */
+ private attribute;
+ /**
+ * Reads a string between double or single quotes.
+ */
+ private quotedString;
+ /**
+ * Determines if the current index is at or past the end of input string.
+ */
+ private eof;
+ /**
+ * Skips the length of the given string if the string from current position
+ * starts with the given string.
+ *
+ * @param str - the string to match
+ */
+ private skipIfStartsWith;
+ /**
+ * Seeks a number of character codes.
+ *
+ * @param count - number of characters to skip
+ */
+ private seek;
+ /**
+ * Skips space characters.
+ */
+ private skipSpace;
+ /**
+ * Takes a given number of characters.
+ *
+ * @param count - character count
+ */
+ private take;
+ /**
+ * Takes characters until the next character matches `char`.
+ *
+ * @param char - a character to match
+ * @param space - whether a space character stops iteration
+ */
+ private takeUntil;
+ /**
+ * Takes characters until the next character matches `char1` or `char1`.
+ *
+ * @param char1 - a character to match
+ * @param char2 - a character to match
+ * @param space - whether a space character stops iteration
+ */
+ private takeUntil2;
+ /**
+ * Takes characters until the next characters matches `str`.
+ *
+ * @param str - a string to match
+ * @param space - whether a space character stops iteration
+ */
+ private takeUntilStartsWith;
+ /**
+ * Skips characters until the next character matches `char`.
+ *
+ * @param char - a character to match
+ */
+ private skipUntil;
+ /**
+ * Determines if the given token is entirely whitespace.
+ *
+ * @param token - the token to check
+ */
+ private static isWhiteSpaceToken;
+ /**
+ * Determines if the given character is whitespace.
+ *
+ * @param char - the character to check
+ */
+ private static isSpace;
+ /**
+ * Determines if the given character is a quote character.
+ *
+ * @param char - the character to check
+ */
+ private static isQuote;
+ /**
+ * Throws a parser error and records the line and column numbers in the parsed
+ * string.
+ *
+ * @param msg - error message
+ */
+ private throwError;
+ /**
+ * Returns an iterator for the lexer.
+ */
+ [Symbol.iterator](): Iterator;
+}
diff --git a/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js b/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js
new file mode 100644
index 0000000..73c66cd
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js
@@ -0,0 +1,512 @@
+"use strict";
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("./interfaces");
+/**
+ * Represents a lexer for XML content in a string.
+ */
+var XMLStringLexer = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `XMLStringLexer`.
+ *
+ * @param str - the string to tokenize and lex
+ * @param options - lexer options
+ */
+ function XMLStringLexer(str, options) {
+ this._options = {
+ skipWhitespaceOnlyText: false
+ };
+ this.err = { line: -1, col: -1, index: -1, str: "" };
+ this._str = str;
+ this._index = 0;
+ this._length = str.length;
+ if (options) {
+ this._options.skipWhitespaceOnlyText = options.skipWhitespaceOnlyText || false;
+ }
+ }
+ /**
+ * Returns the next token.
+ */
+ XMLStringLexer.prototype.nextToken = function () {
+ if (this.eof()) {
+ return { type: interfaces_1.TokenType.EOF };
+ }
+ var token = (this.skipIfStartsWith('<') ? this.openBracket() : this.text());
+ if (this._options.skipWhitespaceOnlyText) {
+ if (token.type === interfaces_1.TokenType.Text &&
+ XMLStringLexer.isWhiteSpaceToken(token)) {
+ token = this.nextToken();
+ }
+ }
+ return token;
+ };
+ /**
+ * Branches from an opening bracket (`<`).
+ */
+ XMLStringLexer.prototype.openBracket = function () {
+ if (this.skipIfStartsWith('?')) {
+ if (this.skipIfStartsWith('xml')) {
+ if (XMLStringLexer.isSpace(this._str[this._index])) {
+ return this.declaration();
+ }
+ else {
+ // a processing instruction starting with xml. e.g.
+ this.seek(-3);
+ return this.pi();
+ }
+ }
+ else {
+ return this.pi();
+ }
+ }
+ else if (this.skipIfStartsWith('!')) {
+ if (this.skipIfStartsWith('--')) {
+ return this.comment();
+ }
+ else if (this.skipIfStartsWith('[CDATA[')) {
+ return this.cdata();
+ }
+ else if (this.skipIfStartsWith('DOCTYPE')) {
+ return this.doctype();
+ }
+ else {
+ this.throwError("Invalid '!' in opening tag.");
+ }
+ }
+ else if (this.skipIfStartsWith('/')) {
+ return this.closeTag();
+ }
+ else {
+ return this.openTag();
+ }
+ };
+ /**
+ * Produces an XML declaration token.
+ */
+ XMLStringLexer.prototype.declaration = function () {
+ var version = '';
+ var encoding = '';
+ var standalone = '';
+ while (!this.eof()) {
+ this.skipSpace();
+ if (this.skipIfStartsWith('?>')) {
+ return { type: interfaces_1.TokenType.Declaration, version: version, encoding: encoding, standalone: standalone };
+ }
+ else {
+ // attribute name
+ var _a = __read(this.attribute(), 2), attName = _a[0], attValue = _a[1];
+ if (attName === 'version')
+ version = attValue;
+ else if (attName === 'encoding')
+ encoding = attValue;
+ else if (attName === 'standalone')
+ standalone = attValue;
+ else
+ this.throwError('Invalid attribute name: ' + attName);
+ }
+ }
+ this.throwError('Missing declaration end symbol `?>`');
+ };
+ /**
+ * Produces a doc type token.
+ */
+ XMLStringLexer.prototype.doctype = function () {
+ var pubId = '';
+ var sysId = '';
+ // name
+ this.skipSpace();
+ var name = this.takeUntil2('[', '>', true);
+ this.skipSpace();
+ if (this.skipIfStartsWith('PUBLIC')) {
+ pubId = this.quotedString();
+ sysId = this.quotedString();
+ }
+ else if (this.skipIfStartsWith('SYSTEM')) {
+ sysId = this.quotedString();
+ }
+ // skip internal subset
+ this.skipSpace();
+ if (this.skipIfStartsWith('[')) {
+ // skip internal subset nodes
+ this.skipUntil(']');
+ if (!this.skipIfStartsWith(']')) {
+ this.throwError('Missing end bracket of DTD internal subset');
+ }
+ }
+ this.skipSpace();
+ if (!this.skipIfStartsWith('>')) {
+ this.throwError('Missing doctype end symbol `>`');
+ }
+ return { type: interfaces_1.TokenType.DocType, name: name, pubId: pubId, sysId: sysId };
+ };
+ /**
+ * Produces a processing instruction token.
+ */
+ XMLStringLexer.prototype.pi = function () {
+ var target = this.takeUntilStartsWith('?>', true);
+ if (this.eof()) {
+ this.throwError('Missing processing instruction end symbol `?>`');
+ }
+ this.skipSpace();
+ if (this.skipIfStartsWith('?>')) {
+ return { type: interfaces_1.TokenType.PI, target: target, data: '' };
+ }
+ var data = this.takeUntilStartsWith('?>');
+ if (this.eof()) {
+ this.throwError('Missing processing instruction end symbol `?>`');
+ }
+ this.seek(2);
+ return { type: interfaces_1.TokenType.PI, target: target, data: data };
+ };
+ /**
+ * Produces a text token.
+ *
+ */
+ XMLStringLexer.prototype.text = function () {
+ var data = this.takeUntil('<');
+ return { type: interfaces_1.TokenType.Text, data: data };
+ };
+ /**
+ * Produces a comment token.
+ *
+ */
+ XMLStringLexer.prototype.comment = function () {
+ var data = this.takeUntilStartsWith('-->');
+ if (this.eof()) {
+ this.throwError('Missing comment end symbol `-->`');
+ }
+ this.seek(3);
+ return { type: interfaces_1.TokenType.Comment, data: data };
+ };
+ /**
+ * Produces a CDATA token.
+ *
+ */
+ XMLStringLexer.prototype.cdata = function () {
+ var data = this.takeUntilStartsWith(']]>');
+ if (this.eof()) {
+ this.throwError('Missing CDATA end symbol `]>`');
+ }
+ this.seek(3);
+ return { type: interfaces_1.TokenType.CDATA, data: data };
+ };
+ /**
+ * Produces an element token.
+ */
+ XMLStringLexer.prototype.openTag = function () {
+ // element name
+ this.skipSpace();
+ var name = this.takeUntil2('>', '/', true);
+ this.skipSpace();
+ if (this.skipIfStartsWith('>')) {
+ return { type: interfaces_1.TokenType.Element, name: name, attributes: [], selfClosing: false };
+ }
+ else if (this.skipIfStartsWith('/>')) {
+ return { type: interfaces_1.TokenType.Element, name: name, attributes: [], selfClosing: true };
+ }
+ // attributes
+ var attributes = [];
+ while (!this.eof()) {
+ // end tag
+ this.skipSpace();
+ if (this.skipIfStartsWith('>')) {
+ return { type: interfaces_1.TokenType.Element, name: name, attributes: attributes, selfClosing: false };
+ }
+ else if (this.skipIfStartsWith('/>')) {
+ return { type: interfaces_1.TokenType.Element, name: name, attributes: attributes, selfClosing: true };
+ }
+ var attr = this.attribute();
+ attributes.push(attr);
+ }
+ this.throwError('Missing opening element tag end symbol `>`');
+ };
+ /**
+ * Produces a closing tag token.
+ *
+ */
+ XMLStringLexer.prototype.closeTag = function () {
+ this.skipSpace();
+ var name = this.takeUntil('>', true);
+ this.skipSpace();
+ if (!this.skipIfStartsWith('>')) {
+ this.throwError('Missing closing element tag end symbol `>`');
+ }
+ return { type: interfaces_1.TokenType.ClosingTag, name: name };
+ };
+ /**
+ * Reads an attribute name, value pair
+ */
+ XMLStringLexer.prototype.attribute = function () {
+ // attribute name
+ this.skipSpace();
+ var name = this.takeUntil('=', true);
+ this.skipSpace();
+ if (!this.skipIfStartsWith('=')) {
+ this.throwError('Missing equals sign before attribute value');
+ }
+ // attribute value
+ var value = this.quotedString();
+ return [name, value];
+ };
+ /**
+ * Reads a string between double or single quotes.
+ */
+ XMLStringLexer.prototype.quotedString = function () {
+ this.skipSpace();
+ var startQuote = this.take(1);
+ if (!XMLStringLexer.isQuote(startQuote)) {
+ this.throwError('Missing start quote character before quoted value');
+ }
+ var value = this.takeUntil(startQuote);
+ if (!this.skipIfStartsWith(startQuote)) {
+ this.throwError('Missing end quote character after quoted value');
+ }
+ return value;
+ };
+ /**
+ * Determines if the current index is at or past the end of input string.
+ */
+ XMLStringLexer.prototype.eof = function () { return this._index >= this._length; };
+ /**
+ * Skips the length of the given string if the string from current position
+ * starts with the given string.
+ *
+ * @param str - the string to match
+ */
+ XMLStringLexer.prototype.skipIfStartsWith = function (str) {
+ var strLength = str.length;
+ if (strLength === 1) {
+ if (this._str[this._index] === str) {
+ this._index++;
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+ for (var i = 0; i < strLength; i++) {
+ if (this._str[this._index + i] !== str[i])
+ return false;
+ }
+ this._index += strLength;
+ return true;
+ };
+ /**
+ * Seeks a number of character codes.
+ *
+ * @param count - number of characters to skip
+ */
+ XMLStringLexer.prototype.seek = function (count) {
+ this._index += count;
+ if (this._index < 0)
+ this._index = 0;
+ if (this._index > this._length)
+ this._index = this._length;
+ };
+ /**
+ * Skips space characters.
+ */
+ XMLStringLexer.prototype.skipSpace = function () {
+ while (!this.eof() && (XMLStringLexer.isSpace(this._str[this._index]))) {
+ this._index++;
+ }
+ };
+ /**
+ * Takes a given number of characters.
+ *
+ * @param count - character count
+ */
+ XMLStringLexer.prototype.take = function (count) {
+ if (count === 1) {
+ return this._str[this._index++];
+ }
+ var startIndex = this._index;
+ this.seek(count);
+ return this._str.slice(startIndex, this._index);
+ };
+ /**
+ * Takes characters until the next character matches `char`.
+ *
+ * @param char - a character to match
+ * @param space - whether a space character stops iteration
+ */
+ XMLStringLexer.prototype.takeUntil = function (char, space) {
+ if (space === void 0) { space = false; }
+ var startIndex = this._index;
+ while (this._index < this._length) {
+ var c = this._str[this._index];
+ if (c !== char && (!space || !XMLStringLexer.isSpace(c))) {
+ this._index++;
+ }
+ else {
+ break;
+ }
+ }
+ return this._str.slice(startIndex, this._index);
+ };
+ /**
+ * Takes characters until the next character matches `char1` or `char1`.
+ *
+ * @param char1 - a character to match
+ * @param char2 - a character to match
+ * @param space - whether a space character stops iteration
+ */
+ XMLStringLexer.prototype.takeUntil2 = function (char1, char2, space) {
+ if (space === void 0) { space = false; }
+ var startIndex = this._index;
+ while (this._index < this._length) {
+ var c = this._str[this._index];
+ if (c !== char1 && c !== char2 && (!space || !XMLStringLexer.isSpace(c))) {
+ this._index++;
+ }
+ else {
+ break;
+ }
+ }
+ return this._str.slice(startIndex, this._index);
+ };
+ /**
+ * Takes characters until the next characters matches `str`.
+ *
+ * @param str - a string to match
+ * @param space - whether a space character stops iteration
+ */
+ XMLStringLexer.prototype.takeUntilStartsWith = function (str, space) {
+ if (space === void 0) { space = false; }
+ var startIndex = this._index;
+ var strLength = str.length;
+ while (this._index < this._length) {
+ var match = true;
+ for (var i = 0; i < strLength; i++) {
+ var c = this._str[this._index + i];
+ var char = str[i];
+ if (space && XMLStringLexer.isSpace(c)) {
+ return this._str.slice(startIndex, this._index);
+ }
+ else if (c !== char) {
+ this._index++;
+ match = false;
+ break;
+ }
+ }
+ if (match)
+ return this._str.slice(startIndex, this._index);
+ }
+ this._index = this._length;
+ return this._str.slice(startIndex);
+ };
+ /**
+ * Skips characters until the next character matches `char`.
+ *
+ * @param char - a character to match
+ */
+ XMLStringLexer.prototype.skipUntil = function (char) {
+ while (this._index < this._length) {
+ var c = this._str[this._index];
+ if (c !== char) {
+ this._index++;
+ }
+ else {
+ break;
+ }
+ }
+ };
+ /**
+ * Determines if the given token is entirely whitespace.
+ *
+ * @param token - the token to check
+ */
+ XMLStringLexer.isWhiteSpaceToken = function (token) {
+ var str = token.data;
+ for (var i = 0; i < str.length; i++) {
+ var c = str[i];
+ if (c !== ' ' && c !== '\n' && c !== '\r' && c !== '\t' && c !== '\f')
+ return false;
+ }
+ return true;
+ };
+ /**
+ * Determines if the given character is whitespace.
+ *
+ * @param char - the character to check
+ */
+ XMLStringLexer.isSpace = function (char) {
+ return char === ' ' || char === '\n' || char === '\r' || char === '\t';
+ };
+ /**
+ * Determines if the given character is a quote character.
+ *
+ * @param char - the character to check
+ */
+ XMLStringLexer.isQuote = function (char) {
+ return (char === '"' || char === '\'');
+ };
+ /**
+ * Throws a parser error and records the line and column numbers in the parsed
+ * string.
+ *
+ * @param msg - error message
+ */
+ XMLStringLexer.prototype.throwError = function (msg) {
+ var regexp = /\r\n|\r|\n/g;
+ var match = null;
+ var line = 0;
+ var firstNewLineIndex = 0;
+ var lastNewlineIndex = this._str.length;
+ while ((match = regexp.exec(this._str)) !== null) {
+ if (match === null)
+ break;
+ line++;
+ if (match.index < this._index)
+ firstNewLineIndex = regexp.lastIndex;
+ if (match.index > this._index) {
+ lastNewlineIndex = match.index;
+ break;
+ }
+ }
+ this.err = {
+ line: line,
+ col: this._index - firstNewLineIndex,
+ index: this._index,
+ str: this._str.substring(firstNewLineIndex, lastNewlineIndex)
+ };
+ throw new Error(msg + "\nIndex: " + this.err.index +
+ "\nLn: " + this.err.line + ", Col: " + this.err.col +
+ "\nInput: " + this.err.str);
+ };
+ /**
+ * Returns an iterator for the lexer.
+ */
+ XMLStringLexer.prototype[Symbol.iterator] = function () {
+ this._index = 0;
+ return {
+ next: function () {
+ var token = this.nextToken();
+ if (token.type === interfaces_1.TokenType.EOF) {
+ return { done: true, value: null };
+ }
+ else {
+ return { done: false, value: token };
+ }
+ }.bind(this)
+ };
+ };
+ return XMLStringLexer;
+}());
+exports.XMLStringLexer = XMLStringLexer;
+//# sourceMappingURL=XMLStringLexer.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js.map b/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js.map
new file mode 100644
index 0000000..41d5626
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"XMLStringLexer.js","sourceRoot":"","sources":["../../src/parser/XMLStringLexer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAIqB;AAErB;;GAEG;AACH;IAWE;;;;;OAKG;IACH,wBAAY,GAAW,EAAE,OAAkC;QAZnD,aAAQ,GAAoB;YAClC,sBAAsB,EAAE,KAAK;SAC9B,CAA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;IACH,CAAC;IAEH,qBAAC;AAAD,CAAC,AA5gBD,IA4gBC;AA5gBY,wCAAc"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/parser/index.d.ts b/node_modules/@oozcitak/dom/lib/parser/index.d.ts
new file mode 100644
index 0000000..6f3bbbc
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/index.d.ts
@@ -0,0 +1 @@
+export { DOMParserImpl as DOMParser } from "./DOMParserImpl";
diff --git a/node_modules/@oozcitak/dom/lib/parser/index.js b/node_modules/@oozcitak/dom/lib/parser/index.js
new file mode 100644
index 0000000..e478e4b
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/index.js
@@ -0,0 +1,6 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+// Export classes
+var DOMParserImpl_1 = require("./DOMParserImpl");
+exports.DOMParser = DOMParserImpl_1.DOMParserImpl;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/parser/index.js.map b/node_modules/@oozcitak/dom/lib/parser/index.js.map
new file mode 100644
index 0000000..bad175c
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":";;AAAA,iBAAiB;AACjB,iDAA4D;AAAnD,oCAAA,aAAa,CAAa"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/parser/interfaces.d.ts b/node_modules/@oozcitak/dom/lib/parser/interfaces.d.ts
new file mode 100644
index 0000000..58a29c0
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/interfaces.d.ts
@@ -0,0 +1,131 @@
+import { Document } from "../dom/interfaces";
+/**
+ * Represents a parser for XML and HTML content.
+ *
+ * See: https://w3c.github.io/DOM-Parsing/#the-domparser-interface
+ */
+export interface DOMParser {
+ /**
+ * Parses the given string and returns a document object.
+ *
+ * @param source - the string containing the document tree.
+ * @param mimeType - the mime type of the document
+ */
+ parseFromString(source: string, mimeType: MimeType): Document;
+}
+/**
+ * Defines the mime type of the document.
+ */
+export declare type MimeType = 'text/html' | 'text/xml' | 'application/xml' | 'application/xhtml+xml' | 'image/svg+xml';
+/**
+ * Represents a token.
+ */
+export interface XMLToken {
+ /**
+ * Token type.
+ */
+ readonly type: TokenType;
+}
+/**
+ * Represents an end-of-file token.
+ */
+export interface EOFToken extends XMLToken {
+ readonly type: TokenType.EOF;
+}
+/**
+ * Represents an XML declaration token.
+ */
+export interface DeclarationToken extends XMLToken {
+ readonly type: TokenType.Declaration;
+ readonly version: string;
+ readonly encoding: string;
+ readonly standalone: string;
+}
+/**
+ * Represents a DocType token.
+ */
+export interface DocTypeToken extends XMLToken {
+ readonly type: TokenType.DocType;
+ readonly name: string;
+ readonly pubId: string;
+ readonly sysId: string;
+}
+/**
+ * Represents a character data token.
+ */
+export interface CharacterDataToken extends XMLToken {
+ readonly data: string;
+}
+/**
+ * Represents a comment token.
+ */
+export interface CommentToken extends CharacterDataToken {
+ readonly type: TokenType.Comment;
+}
+/**
+ * Represents a CDATA token.
+ */
+export interface CDATAToken extends CharacterDataToken {
+ readonly type: TokenType.CDATA;
+}
+/**
+ * Represents a text token.
+ */
+export interface TextToken extends CharacterDataToken {
+ readonly type: TokenType.Text;
+}
+/**
+ * Represents a processing instruction token.
+ */
+export interface PIToken extends CharacterDataToken {
+ readonly type: TokenType.PI;
+ readonly target: string;
+}
+/**
+ * Represents an element token.
+ */
+export interface ElementToken extends XMLToken {
+ readonly type: TokenType.Element;
+ readonly name: string;
+ readonly attributes: Array<[string, string]>;
+ readonly selfClosing: boolean;
+}
+/**
+ * Represents a closing tag token.
+ */
+export interface ClosingTagToken extends XMLToken {
+ readonly type: TokenType.ClosingTag;
+ readonly name: string;
+}
+/**
+ * Represents a lexer for XML content.
+ */
+export interface XMLLexer extends Iterable {
+ /**
+ * Returns the next token.
+ */
+ nextToken(): XMLToken;
+}
+/**
+ * Defines lexer options.
+ */
+export declare type XMLLexerOptions = {
+ /**
+ * Determines whether whitespace-only text nodes are skipped or not.
+ */
+ skipWhitespaceOnlyText: boolean;
+};
+/**
+ * Defines the type of a token.
+ */
+export declare enum TokenType {
+ EOF = 0,
+ Declaration = 1,
+ DocType = 2,
+ Element = 3,
+ Text = 4,
+ CDATA = 5,
+ PI = 6,
+ Comment = 7,
+ ClosingTag = 8
+}
diff --git a/node_modules/@oozcitak/dom/lib/parser/interfaces.js b/node_modules/@oozcitak/dom/lib/parser/interfaces.js
new file mode 100644
index 0000000..287b513
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/interfaces.js
@@ -0,0 +1,18 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Defines the type of a token.
+ */
+var TokenType;
+(function (TokenType) {
+ TokenType[TokenType["EOF"] = 0] = "EOF";
+ TokenType[TokenType["Declaration"] = 1] = "Declaration";
+ TokenType[TokenType["DocType"] = 2] = "DocType";
+ TokenType[TokenType["Element"] = 3] = "Element";
+ TokenType[TokenType["Text"] = 4] = "Text";
+ TokenType[TokenType["CDATA"] = 5] = "CDATA";
+ TokenType[TokenType["PI"] = 6] = "PI";
+ TokenType[TokenType["Comment"] = 7] = "Comment";
+ TokenType[TokenType["ClosingTag"] = 8] = "ClosingTag";
+})(TokenType = exports.TokenType || (exports.TokenType = {}));
+//# sourceMappingURL=interfaces.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/parser/interfaces.js.map b/node_modules/@oozcitak/dom/lib/parser/interfaces.js.map
new file mode 100644
index 0000000..e718bc0
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/parser/interfaces.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/parser/interfaces.ts"],"names":[],"mappings":";;AAuIA;;GAEG;AACH,IAAY,SAUX;AAVD,WAAY,SAAS;IACnB,uCAAG,CAAA;IACH,uDAAW,CAAA;IACX,+CAAO,CAAA;IACP,+CAAO,CAAA;IACP,yCAAI,CAAA;IACJ,2CAAK,CAAA;IACL,qCAAE,CAAA;IACF,+CAAO,CAAA;IACP,qDAAU,CAAA;AACZ,CAAC,EAVW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAUpB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.d.ts b/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.d.ts
new file mode 100644
index 0000000..44282c3
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.d.ts
@@ -0,0 +1,27 @@
+/**
+ * Represents a set of unique attribute namespaceURI and localName pairs.
+ * This set will contain tuples of unique attribute namespaceURI and
+ * localName pairs, and is populated as each attr is processed. This set is
+ * used to [optionally] enforce the well-formed constraint that an element
+ * cannot have two attributes with the same namespaceURI and localName.
+ * This can occur when two otherwise identical attributes on the same
+ * element differ only by their prefix values.
+ */
+export declare class LocalNameSet {
+ private _items;
+ private _nullItems;
+ /**
+ * Adds or replaces a tuple.
+ *
+ * @param ns - namespace URI
+ * @param localName - attribute local name
+ */
+ set(ns: string | null, localName: string): void;
+ /**
+ * Determines if the given tuple exists in the set.
+ *
+ * @param ns - namespace URI
+ * @param localName - attribute local name
+ */
+ has(ns: string | null, localName: string): boolean;
+}
diff --git a/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js b/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js
new file mode 100644
index 0000000..f0cb377
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js
@@ -0,0 +1,56 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Represents a set of unique attribute namespaceURI and localName pairs.
+ * This set will contain tuples of unique attribute namespaceURI and
+ * localName pairs, and is populated as each attr is processed. This set is
+ * used to [optionally] enforce the well-formed constraint that an element
+ * cannot have two attributes with the same namespaceURI and localName.
+ * This can occur when two otherwise identical attributes on the same
+ * element differ only by their prefix values.
+ */
+var LocalNameSet = /** @class */ (function () {
+ function LocalNameSet() {
+ // tuple storage
+ this._items = {};
+ this._nullItems = {};
+ }
+ /**
+ * Adds or replaces a tuple.
+ *
+ * @param ns - namespace URI
+ * @param localName - attribute local name
+ */
+ LocalNameSet.prototype.set = function (ns, localName) {
+ if (ns === null) {
+ this._nullItems[localName] = true;
+ }
+ else if (this._items[ns]) {
+ this._items[ns][localName] = true;
+ }
+ else {
+ this._items[ns] = {};
+ this._items[ns][localName] = true;
+ }
+ };
+ /**
+ * Determines if the given tuple exists in the set.
+ *
+ * @param ns - namespace URI
+ * @param localName - attribute local name
+ */
+ LocalNameSet.prototype.has = function (ns, localName) {
+ if (ns === null) {
+ return this._nullItems[localName] === true;
+ }
+ else if (this._items[ns]) {
+ return this._items[ns][localName] === true;
+ }
+ else {
+ return false;
+ }
+ };
+ return LocalNameSet;
+}());
+exports.LocalNameSet = LocalNameSet;
+//# sourceMappingURL=LocalNameSet.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js.map b/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js.map
new file mode 100644
index 0000000..49c8e95
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"LocalNameSet.js","sourceRoot":"","sources":["../../src/serializer/LocalNameSet.ts"],"names":[],"mappings":";;AAAA;;;;;;;;GAQG;AACH;IAAA;QAEE,gBAAgB;QACR,WAAM,GAAkD,EAAE,CAAA;QAC1D,eAAU,GAA+B,EAAE,CAAA;IAmCrD,CAAC;IAjCC;;;;;OAKG;IACH,0BAAG,GAAH,UAAI,EAAiB,EAAE,SAAiB;QACtC,IAAI,EAAE,KAAK,IAAI,EAAE;YACf,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;SAClC;aAAM,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE;YAC1B,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;SAClC;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,CAAA;YACpB,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;SAClC;IACH,CAAC;IAED;;;;;OAKG;IACH,0BAAG,GAAH,UAAI,EAAiB,EAAE,SAAiB;QACtC,IAAI,EAAE,KAAK,IAAI,EAAE;YACf,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,IAAI,CAAA;SAC3C;aAAM,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,IAAI,CAAA;SAC3C;aAAM;YACL,OAAO,KAAK,CAAA;SACb;IACH,CAAC;IAEH,mBAAC;AAAD,CAAC,AAvCD,IAuCC;AAvCY,oCAAY"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.d.ts b/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.d.ts
new file mode 100644
index 0000000..72a491e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.d.ts
@@ -0,0 +1,52 @@
+/**
+ * A namespace prefix map is a map that associates namespaceURI and namespace
+ * prefix lists, where namespaceURI values are the map's unique keys (which can
+ * include the null value representing no namespace), and ordered lists of
+ * associated prefix values are the map's key values. The namespace prefix map
+ * will be populated by previously seen namespaceURIs and all their previously
+ * encountered prefix associations for a given node and its ancestors.
+ *
+ * _Note:_ The last seen prefix for a given namespaceURI is at the end of its
+ * respective list. The list is searched to find potentially matching prefixes,
+ * and if no matches are found for the given namespaceURI, then the last prefix
+ * in the list is used. See copy a namespace prefix map and retrieve a preferred
+ * prefix string for additional details.
+ *
+ * See: https://w3c.github.io/DOM-Parsing/#the-namespace-prefix-map
+ */
+export declare class NamespacePrefixMap {
+ private _items;
+ private _nullItems;
+ /**
+ * Creates a copy of the map.
+ */
+ copy(): NamespacePrefixMap;
+ /**
+ * Retrieves a preferred prefix string from the namespace prefix map.
+ *
+ * @param preferredPrefix - preferred prefix string
+ * @param ns - namespace
+ */
+ get(preferredPrefix: string | null, ns: string | null): string | null;
+ /**
+ * Checks if a prefix string is found in the namespace prefix map associated
+ * with the given namespace.
+ *
+ * @param prefix - prefix string
+ * @param ns - namespace
+ */
+ has(prefix: string, ns: string | null): boolean;
+ /**
+ * Checks if a prefix string is found in the namespace prefix map.
+ *
+ * @param prefix - prefix string
+ */
+ hasPrefix(prefix: string): boolean;
+ /**
+ * Adds a prefix string associated with a namespace to the prefix map.
+ *
+ * @param prefix - prefix string
+ * @param ns - namespace
+ */
+ set(prefix: string, ns: string | null): void;
+}
diff --git a/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js b/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js
new file mode 100644
index 0000000..e13defa
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js
@@ -0,0 +1,151 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * A namespace prefix map is a map that associates namespaceURI and namespace
+ * prefix lists, where namespaceURI values are the map's unique keys (which can
+ * include the null value representing no namespace), and ordered lists of
+ * associated prefix values are the map's key values. The namespace prefix map
+ * will be populated by previously seen namespaceURIs and all their previously
+ * encountered prefix associations for a given node and its ancestors.
+ *
+ * _Note:_ The last seen prefix for a given namespaceURI is at the end of its
+ * respective list. The list is searched to find potentially matching prefixes,
+ * and if no matches are found for the given namespaceURI, then the last prefix
+ * in the list is used. See copy a namespace prefix map and retrieve a preferred
+ * prefix string for additional details.
+ *
+ * See: https://w3c.github.io/DOM-Parsing/#the-namespace-prefix-map
+ */
+var NamespacePrefixMap = /** @class */ (function () {
+ function NamespacePrefixMap() {
+ this._items = {};
+ this._nullItems = [];
+ }
+ /**
+ * Creates a copy of the map.
+ */
+ NamespacePrefixMap.prototype.copy = function () {
+ /**
+ * To copy a namespace prefix map map means to copy the map's keys into a
+ * new empty namespace prefix map, and to copy each of the values in the
+ * namespace prefix list associated with each keys' value into a new list
+ * which should be associated with the respective key in the new map.
+ */
+ var mapCopy = new NamespacePrefixMap();
+ for (var key in this._items) {
+ mapCopy._items[key] = this._items[key].slice(0);
+ }
+ mapCopy._nullItems = this._nullItems.slice(0);
+ return mapCopy;
+ };
+ /**
+ * Retrieves a preferred prefix string from the namespace prefix map.
+ *
+ * @param preferredPrefix - preferred prefix string
+ * @param ns - namespace
+ */
+ NamespacePrefixMap.prototype.get = function (preferredPrefix, ns) {
+ /**
+ * 1. Let candidates list be the result of retrieving a list from map where
+ * there exists a key in map that matches the value of ns or if there is no
+ * such key, then stop running these steps, and return the null value.
+ */
+ var candidatesList = ns === null ? this._nullItems : (this._items[ns] || null);
+ if (candidatesList === null) {
+ return null;
+ }
+ /**
+ * 2. Otherwise, for each prefix value prefix in candidates list, iterating
+ * from beginning to end:
+ *
+ * _Note:_ There will always be at least one prefix value in the list.
+ */
+ var prefix = null;
+ for (var i = 0; i < candidatesList.length; i++) {
+ prefix = candidatesList[i];
+ /**
+ * 2.1. If prefix matches preferred prefix, then stop running these steps
+ * and return prefix.
+ */
+ if (prefix === preferredPrefix) {
+ return prefix;
+ }
+ }
+ /**
+ * 2.2. If prefix is the last item in the candidates list, then stop
+ * running these steps and return prefix.
+ */
+ return prefix;
+ };
+ /**
+ * Checks if a prefix string is found in the namespace prefix map associated
+ * with the given namespace.
+ *
+ * @param prefix - prefix string
+ * @param ns - namespace
+ */
+ NamespacePrefixMap.prototype.has = function (prefix, ns) {
+ /**
+ * 1. Let candidates list be the result of retrieving a list from map where
+ * there exists a key in map that matches the value of ns or if there is
+ * no such key, then stop running these steps, and return false.
+ */
+ var candidatesList = ns === null ? this._nullItems : (this._items[ns] || null);
+ if (candidatesList === null) {
+ return false;
+ }
+ /**
+ * 2. If the value of prefix occurs at least once in candidates list,
+ * return true, otherwise return false.
+ */
+ return (candidatesList.indexOf(prefix) !== -1);
+ };
+ /**
+ * Checks if a prefix string is found in the namespace prefix map.
+ *
+ * @param prefix - prefix string
+ */
+ NamespacePrefixMap.prototype.hasPrefix = function (prefix) {
+ if (this._nullItems.indexOf(prefix) !== -1)
+ return true;
+ for (var key in this._items) {
+ if (this._items[key].indexOf(prefix) !== -1)
+ return true;
+ }
+ return false;
+ };
+ /**
+ * Adds a prefix string associated with a namespace to the prefix map.
+ *
+ * @param prefix - prefix string
+ * @param ns - namespace
+ */
+ NamespacePrefixMap.prototype.set = function (prefix, ns) {
+ /**
+ * 1. Let candidates list be the result of retrieving a list from map where
+ * there exists a key in map that matches the value of ns or if there is
+ * no such key, then let candidates list be null.
+ */
+ var candidatesList = ns === null ? this._nullItems : (this._items[ns] || null);
+ /**
+ * 2. If candidates list is null, then create a new list with prefix as the
+ * only item in the list, and associate that list with a new key ns in map.
+ * 3. Otherwise, append prefix to the end of candidates list.
+ *
+ * _Note:_ The steps in retrieve a preferred prefix string use the list to
+ * track the most recently used (MRU) prefix associated with a given
+ * namespace, which will be the prefix at the end of the list. This list
+ * may contain duplicates of the same prefix value seen earlier
+ * (and that's OK).
+ */
+ if (ns !== null && candidatesList === null) {
+ this._items[ns] = [prefix];
+ }
+ else {
+ candidatesList.push(prefix);
+ }
+ };
+ return NamespacePrefixMap;
+}());
+exports.NamespacePrefixMap = NamespacePrefixMap;
+//# sourceMappingURL=NamespacePrefixMap.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js.map b/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js.map
new file mode 100644
index 0000000..d5ae4c1
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"NamespacePrefixMap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BAAC;AAAD,CAAC,AAtID,IAsIC;AAtIY,gDAAkB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.d.ts b/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.d.ts
new file mode 100644
index 0000000..78b8166
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.d.ts
@@ -0,0 +1,166 @@
+import { Node } from "../dom/interfaces";
+import { XMLSerializer } from "./interfaces";
+/**
+ * Represents an XML serializer.
+ *
+ * Implements: https://www.w3.org/TR/DOM-Parsing/#serializing
+ */
+export declare class XMLSerializerImpl implements XMLSerializer {
+ private static _VoidElementNames;
+ /** @inheritdoc */
+ serializeToString(root: Node): string;
+ /**
+ * Produces an XML serialization of the given node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _xmlSerialization;
+ /**
+ * Produces an XML serialization of a node.
+ *
+ * @param node - node to serialize
+ * @param namespace - context namespace
+ * @param prefixMap - namespace prefix map
+ * @param prefixIndex - generated namespace prefix index
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeNodeNS;
+ /**
+ * Produces an XML serialization of a node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeNode;
+ /**
+ * Produces an XML serialization of an element node.
+ *
+ * @param node - node to serialize
+ * @param namespace - context namespace
+ * @param prefixMap - namespace prefix map
+ * @param prefixIndex - generated namespace prefix index
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeElementNS;
+ /**
+ * Produces an XML serialization of a document node.
+ *
+ * @param node - node to serialize
+ * @param namespace - context namespace
+ * @param prefixMap - namespace prefix map
+ * @param prefixIndex - generated namespace prefix index
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeDocumentNS;
+ /**
+ * Produces an XML serialization of a comment node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeComment;
+ /**
+ * Produces an XML serialization of a text node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ * @param level - current depth of the XML tree
+ */
+ private _serializeText;
+ /**
+ * Produces an XML serialization of a document fragment node.
+ *
+ * @param node - node to serialize
+ * @param namespace - context namespace
+ * @param prefixMap - namespace prefix map
+ * @param prefixIndex - generated namespace prefix index
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeDocumentFragmentNS;
+ /**
+ * Produces an XML serialization of a document type node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeDocumentType;
+ /**
+ * Produces an XML serialization of a processing instruction node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeProcessingInstruction;
+ /**
+ * Produces an XML serialization of a CDATA node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeCData;
+ /**
+ * Produces an XML serialization of the attributes of an element node.
+ *
+ * @param node - node to serialize
+ * @param map - namespace prefix map
+ * @param prefixIndex - generated namespace prefix index
+ * @param localPrefixesMap - local prefixes map
+ * @param ignoreNamespaceDefinitionAttribute - whether to ignore namespace
+ * attributes
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeAttributesNS;
+ /**
+ * Records namespace information for the given element and returns the
+ * default namespace attribute value.
+ *
+ * @param node - element node to process
+ * @param map - namespace prefix map
+ * @param localPrefixesMap - local prefixes map
+ */
+ private _recordNamespaceInformation;
+ /**
+ * Generates a new prefix for the given namespace.
+ *
+ * @param newNamespace - a namespace to generate prefix for
+ * @param prefixMap - namespace prefix map
+ * @param prefixIndex - generated namespace prefix index
+ */
+ private _generatePrefix;
+ /**
+ * Produces an XML serialization of an attribute value.
+ *
+ * @param value - attribute value
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeAttributeValue;
+ /**
+ * Produces an XML serialization of an element node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeElement;
+ /**
+ * Produces an XML serialization of a document node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeDocument;
+ /**
+ * Produces an XML serialization of a document fragment node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeDocumentFragment;
+ /**
+ * Produces an XML serialization of the attributes of an element node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ private _serializeAttributes;
+}
diff --git a/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js b/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js
new file mode 100644
index 0000000..1161510
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js
@@ -0,0 +1,1479 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("../dom/interfaces");
+var LocalNameSet_1 = require("./LocalNameSet");
+var NamespacePrefixMap_1 = require("./NamespacePrefixMap");
+var DOMException_1 = require("../dom/DOMException");
+var infra_1 = require("@oozcitak/infra");
+var algorithm_1 = require("../algorithm");
+/**
+ * Represents an XML serializer.
+ *
+ * Implements: https://www.w3.org/TR/DOM-Parsing/#serializing
+ */
+var XMLSerializerImpl = /** @class */ (function () {
+ function XMLSerializerImpl() {
+ }
+ /** @inheritdoc */
+ XMLSerializerImpl.prototype.serializeToString = function (root) {
+ /**
+ * The serializeToString(root) method must produce an XML serialization
+ * of root passing a value of false for the require well-formed parameter,
+ * and return the result.
+ */
+ return this._xmlSerialization(root, false);
+ };
+ /**
+ * Produces an XML serialization of the given node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._xmlSerialization = function (node, requireWellFormed) {
+ // To increase performance, use a namespace-aware serializer only if the
+ // document has namespaced elements
+ if (node._nodeDocument === undefined || node._nodeDocument._hasNamespaces) {
+ /** From: https://w3c.github.io/DOM-Parsing/#xml-serialization
+ *
+ * 1. Let namespace be a context namespace with value null.
+ * The context namespace tracks the XML serialization algorithm's current
+ * default namespace. The context namespace is changed when either an Element
+ * Node has a default namespace declaration, or the algorithm generates a
+ * default namespace declaration for the Element Node to match its own
+ * namespace. The algorithm assumes no namespace (null) to start.
+ * 2. Let prefix map be a new namespace prefix map.
+ * 3. Add the XML namespace with prefix value "xml" to prefix map.
+ * 4. Let prefix index be a generated namespace prefix index with value 1.
+ * The generated namespace prefix index is used to generate a new unique
+ * prefix value when no suitable existing namespace prefix is available to
+ * serialize a node's namespaceURI (or the namespaceURI of one of node's
+ * attributes). See the generate a prefix algorithm.
+ */
+ var namespace = null;
+ var prefixMap = new NamespacePrefixMap_1.NamespacePrefixMap();
+ prefixMap.set("xml", infra_1.namespace.XML);
+ var prefixIndex = { value: 1 };
+ /**
+ * 5. Return the result of running the XML serialization algorithm on node
+ * passing the context namespace namespace, namespace prefix map prefix map,
+ * generated namespace prefix index reference to prefix index, and the
+ * flag require well-formed. If an exception occurs during the execution
+ * of the algorithm, then catch that exception and throw an
+ * "InvalidStateError" DOMException.
+ */
+ try {
+ return this._serializeNodeNS(node, namespace, prefixMap, prefixIndex, requireWellFormed);
+ }
+ catch (_a) {
+ throw new DOMException_1.InvalidStateError();
+ }
+ }
+ else {
+ try {
+ return this._serializeNode(node, requireWellFormed);
+ }
+ catch (_b) {
+ throw new DOMException_1.InvalidStateError();
+ }
+ }
+ };
+ /**
+ * Produces an XML serialization of a node.
+ *
+ * @param node - node to serialize
+ * @param namespace - context namespace
+ * @param prefixMap - namespace prefix map
+ * @param prefixIndex - generated namespace prefix index
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeNodeNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) {
+ switch (node.nodeType) {
+ case interfaces_1.NodeType.Element:
+ return this._serializeElementNS(node, namespace, prefixMap, prefixIndex, requireWellFormed);
+ case interfaces_1.NodeType.Document:
+ return this._serializeDocumentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed);
+ case interfaces_1.NodeType.Comment:
+ return this._serializeComment(node, requireWellFormed);
+ case interfaces_1.NodeType.Text:
+ return this._serializeText(node, requireWellFormed);
+ case interfaces_1.NodeType.DocumentFragment:
+ return this._serializeDocumentFragmentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed);
+ case interfaces_1.NodeType.DocumentType:
+ return this._serializeDocumentType(node, requireWellFormed);
+ case interfaces_1.NodeType.ProcessingInstruction:
+ return this._serializeProcessingInstruction(node, requireWellFormed);
+ case interfaces_1.NodeType.CData:
+ return this._serializeCData(node, requireWellFormed);
+ default:
+ throw new Error("Unknown node type: " + node.nodeType);
+ }
+ };
+ /**
+ * Produces an XML serialization of a node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeNode = function (node, requireWellFormed) {
+ switch (node.nodeType) {
+ case interfaces_1.NodeType.Element:
+ return this._serializeElement(node, requireWellFormed);
+ case interfaces_1.NodeType.Document:
+ return this._serializeDocument(node, requireWellFormed);
+ case interfaces_1.NodeType.Comment:
+ return this._serializeComment(node, requireWellFormed);
+ case interfaces_1.NodeType.Text:
+ return this._serializeText(node, requireWellFormed);
+ case interfaces_1.NodeType.DocumentFragment:
+ return this._serializeDocumentFragment(node, requireWellFormed);
+ case interfaces_1.NodeType.DocumentType:
+ return this._serializeDocumentType(node, requireWellFormed);
+ case interfaces_1.NodeType.ProcessingInstruction:
+ return this._serializeProcessingInstruction(node, requireWellFormed);
+ case interfaces_1.NodeType.CData:
+ return this._serializeCData(node, requireWellFormed);
+ default:
+ throw new Error("Unknown node type: " + node.nodeType);
+ }
+ };
+ /**
+ * Produces an XML serialization of an element node.
+ *
+ * @param node - node to serialize
+ * @param namespace - context namespace
+ * @param prefixMap - namespace prefix map
+ * @param prefixIndex - generated namespace prefix index
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeElementNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) {
+ var e_1, _a;
+ /**
+ * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node
+ *
+ * 1. If the require well-formed flag is set (its value is true), and this
+ * node's localName attribute contains the character ":" (U+003A COLON) or
+ * does not match the XML Name production, then throw an exception; the
+ * serialization of this node would not be a well-formed element.
+ */
+ if (requireWellFormed && (node.localName.indexOf(":") !== -1 ||
+ !algorithm_1.xml_isName(node.localName))) {
+ throw new Error("Node local name contains invalid characters (well-formed required).");
+ }
+ /**
+ * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN).
+ * 3. Let qualified name be an empty string.
+ * 4. Let skip end tag be a boolean flag with value false.
+ * 5. Let ignore namespace definition attribute be a boolean flag with value
+ * false.
+ * 6. Given prefix map, copy a namespace prefix map and let map be the
+ * result.
+ * 7. Let local prefixes map be an empty map. The map has unique Node prefix
+ * strings as its keys, with corresponding namespaceURI Node values as the
+ * map's key values (in this map, the null namespace is represented by the
+ * empty string).
+ *
+ * _Note:_ This map is local to each element. It is used to ensure there
+ * are no conflicting prefixes should a new namespace prefix attribute need
+ * to be generated. It is also used to enable skipping of duplicate prefix
+ * definitions when writing an element's attributes: the map allows the
+ * algorithm to distinguish between a prefix in the namespace prefix map
+ * that might be locally-defined (to the current Element) and one that is
+ * not.
+ * 8. Let local default namespace be the result of recording the namespace
+ * information for node given map and local prefixes map.
+ *
+ * _Note:_ The above step will update map with any found namespace prefix
+ * definitions, add the found prefix definitions to the local prefixes map
+ * and return a local default namespace value defined by a default namespace
+ * attribute if one exists. Otherwise it returns null.
+ * 9. Let inherited ns be a copy of namespace.
+ * 10. Let ns be the value of node's namespaceURI attribute.
+ */
+ var markup = "<";
+ var qualifiedName = '';
+ var skipEndTag = false;
+ var ignoreNamespaceDefinitionAttribute = false;
+ var map = prefixMap.copy();
+ var localPrefixesMap = {};
+ var localDefaultNamespace = this._recordNamespaceInformation(node, map, localPrefixesMap);
+ var inheritedNS = namespace;
+ var ns = node.namespaceURI;
+ /** 11. If inherited ns is equal to ns, then: */
+ if (inheritedNS === ns) {
+ /**
+ * 11.1. If local default namespace is not null, then set ignore
+ * namespace definition attribute to true.
+ */
+ if (localDefaultNamespace !== null) {
+ ignoreNamespaceDefinitionAttribute = true;
+ }
+ /**
+ * 11.2. If ns is the XML namespace, then append to qualified name the
+ * concatenation of the string "xml:" and the value of node's localName.
+ * 11.3. Otherwise, append to qualified name the value of node's
+ * localName. The node's prefix if it exists, is dropped.
+ */
+ if (ns === infra_1.namespace.XML) {
+ qualifiedName = 'xml:' + node.localName;
+ }
+ else {
+ qualifiedName = node.localName;
+ }
+ /** 11.4. Append the value of qualified name to markup. */
+ markup += qualifiedName;
+ }
+ else {
+ /**
+ * 12. Otherwise, inherited ns is not equal to ns (the node's own
+ * namespace is different from the context namespace of its parent).
+ * Run these sub-steps:
+ *
+ * 12.1. Let prefix be the value of node's prefix attribute.
+ * 12.2. Let candidate prefix be the result of retrieving a preferred
+ * prefix string prefix from map given namespace ns. The above may return
+ * null if no namespace key ns exists in map.
+ */
+ var prefix = node.prefix;
+ /**
+ * We don't need to run "retrieving a preferred prefix string" algorithm if
+ * the element has no prefix and its namespace matches to the default
+ * namespace.
+ * See: https://github.com/web-platform-tests/wpt/pull/16703
+ */
+ var candidatePrefix = null;
+ if (prefix !== null || ns !== localDefaultNamespace) {
+ candidatePrefix = map.get(prefix, ns);
+ }
+ /**
+ * 12.3. If the value of prefix matches "xmlns", then run the following
+ * steps:
+ */
+ if (prefix === "xmlns") {
+ /**
+ * 12.3.1. If the require well-formed flag is set, then throw an error.
+ * An Element with prefix "xmlns" will not legally round-trip in a
+ * conforming XML parser.
+ */
+ if (requireWellFormed) {
+ throw new Error("An element cannot have the 'xmlns' prefix (well-formed required).");
+ }
+ /**
+ * 12.3.2. Let candidate prefix be the value of prefix.
+ */
+ candidatePrefix = prefix;
+ }
+ /**
+ * 12.4.Found a suitable namespace prefix: if candidate prefix is not
+ * null (a namespace prefix is defined which maps to ns), then:
+ */
+ if (candidatePrefix !== null) {
+ /**
+ * The following may serialize a different prefix than the Element's
+ * existing prefix if it already had one. However, the retrieving a
+ * preferred prefix string algorithm already tried to match the
+ * existing prefix if possible.
+ *
+ * 12.4.1. Append to qualified name the concatenation of candidate
+ * prefix, ":" (U+003A COLON), and node's localName. There exists on
+ * this node or the node's ancestry a namespace prefix definition that
+ * defines the node's namespace.
+ * 12.4.2. If the local default namespace is not null (there exists a
+ * locally-defined default namespace declaration attribute) and its
+ * value is not the XML namespace, then let inherited ns get the value
+ * of local default namespace unless the local default namespace is the
+ * empty string in which case let it get null (the context namespace
+ * is changed to the declared default, rather than this node's own
+ * namespace).
+ *
+ * _Note:_ Any default namespace definitions or namespace prefixes that
+ * define the XML namespace are omitted when serializing this node's
+ * attributes.
+ */
+ qualifiedName = candidatePrefix + ':' + node.localName;
+ if (localDefaultNamespace !== null && localDefaultNamespace !== infra_1.namespace.XML) {
+ inheritedNS = localDefaultNamespace || null;
+ }
+ /**
+ * 12.4.3. Append the value of qualified name to markup.
+ */
+ markup += qualifiedName;
+ /** 12.5. Otherwise, if prefix is not null, then: */
+ }
+ else if (prefix !== null) {
+ /**
+ * _Note:_ By this step, there is no namespace or prefix mapping
+ * declaration in this node (or any parent node visited by this
+ * algorithm) that defines prefix otherwise the step labelled Found
+ * a suitable namespace prefix would have been followed. The sub-steps
+ * that follow will create a new namespace prefix declaration for prefix
+ * and ensure that prefix does not conflict with an existing namespace
+ * prefix declaration of the same localName in node's attribute list.
+ *
+ * 12.5.1. If the local prefixes map contains a key matching prefix,
+ * then let prefix be the result of generating a prefix providing as
+ * input map, ns, and prefix index.
+ */
+ if (prefix in localPrefixesMap) {
+ prefix = this._generatePrefix(ns, map, prefixIndex);
+ }
+ /**
+ * 12.5.2. Add prefix to map given namespace ns.
+ * 12.5.3. Append to qualified name the concatenation of prefix, ":"
+ * (U+003A COLON), and node's localName.
+ * 12.5.4. Append the value of qualified name to markup.
+ */
+ map.set(prefix, ns);
+ qualifiedName += prefix + ':' + node.localName;
+ markup += qualifiedName;
+ /**
+ * 12.5.5. Append the following to markup, in the order listed:
+ *
+ * _Note:_ The following serializes a namespace prefix declaration for
+ * prefix which was just added to the map.
+ *
+ * 12.5.5.1. " " (U+0020 SPACE);
+ * 12.5.5.2. The string "xmlns:";
+ * 12.5.5.3. The value of prefix;
+ * 12.5.5.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
+ * 12.5.5.5. The result of serializing an attribute value given ns and
+ * the require well-formed flag as input;
+ * 12.5.5.6. """ (U+0022 QUOTATION MARK).
+ */
+ markup += " xmlns:" + prefix + "=\"" +
+ this._serializeAttributeValue(ns, requireWellFormed) + "\"";
+ /**
+ * 12.5.5.7. If local default namespace is not null (there exists a
+ * locally-defined default namespace declaration attribute), then
+ * let inherited ns get the value of local default namespace unless the
+ * local default namespace is the empty string in which case let it get
+ * null.
+ */
+ if (localDefaultNamespace !== null) {
+ inheritedNS = localDefaultNamespace || null;
+ }
+ /**
+ * 12.6. Otherwise, if local default namespace is null, or local
+ * default namespace is not null and its value is not equal to ns, then:
+ */
+ }
+ else if (localDefaultNamespace === null ||
+ (localDefaultNamespace !== null && localDefaultNamespace !== ns)) {
+ /**
+ * _Note:_ At this point, the namespace for this node still needs to be
+ * serialized, but there's no prefix (or candidate prefix) available; the
+ * following uses the default namespace declaration to define the
+ * namespace--optionally replacing an existing default declaration
+ * if present.
+ *
+ * 12.6.1. Set the ignore namespace definition attribute flag to true.
+ * 12.6.2. Append to qualified name the value of node's localName.
+ * 12.6.3. Let the value of inherited ns be ns.
+ *
+ * _Note:_ The new default namespace will be used in the serialization
+ * to define this node's namespace and act as the context namespace for
+ * its children.
+ */
+ ignoreNamespaceDefinitionAttribute = true;
+ qualifiedName += node.localName;
+ inheritedNS = ns;
+ /**
+ * 12.6.4. Append the value of qualified name to markup.
+ */
+ markup += qualifiedName;
+ /**
+ * 12.6.5. Append the following to markup, in the order listed:
+ *
+ * _Note:_ The following serializes the new (or replacement) default
+ * namespace definition.
+ *
+ * 12.6.5.1. " " (U+0020 SPACE);
+ * 12.6.5.2. The string "xmlns";
+ * 12.6.5.3. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
+ * 12.6.5.4. The result of serializing an attribute value given ns
+ * and the require well-formed flag as input;
+ * 12.6.5.5. """ (U+0022 QUOTATION MARK).
+ */
+ markup += " xmlns" + "=\"" +
+ this._serializeAttributeValue(ns, requireWellFormed) + "\"";
+ /**
+ * 12.7. Otherwise, the node has a local default namespace that matches
+ * ns. Append to qualified name the value of node's localName, let the
+ * value of inherited ns be ns, and append the value of qualified name
+ * to markup.
+ */
+ }
+ else {
+ qualifiedName += node.localName;
+ inheritedNS = ns;
+ markup += qualifiedName;
+ }
+ }
+ /**
+ * 13. Append to markup the result of the XML serialization of node's
+ * attributes given map, prefix index, local prefixes map, ignore namespace
+ * definition attribute flag, and require well-formed flag.
+ */
+ markup += this._serializeAttributesNS(node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed);
+ /**
+ * 14. If ns is the HTML namespace, and the node's list of children is
+ * empty, and the node's localName matches any one of the following void
+ * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed",
+ * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta",
+ * "param", "source", "track", "wbr"; then append the following to markup,
+ * in the order listed:
+ * 14.1. " " (U+0020 SPACE);
+ * 14.2. "/" (U+002F SOLIDUS).
+ * and set the skip end tag flag to true.
+ * 15. If ns is not the HTML namespace, and the node's list of children is
+ * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end
+ * tag flag to true.
+ * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup.
+ */
+ var isHTML = (ns === infra_1.namespace.HTML);
+ if (isHTML && node.childNodes.length === 0 &&
+ XMLSerializerImpl._VoidElementNames.has(node.localName)) {
+ markup += " /";
+ skipEndTag = true;
+ }
+ else if (!isHTML && node.childNodes.length === 0) {
+ markup += "/";
+ skipEndTag = true;
+ }
+ markup += ">";
+ /**
+ * 17. If the value of skip end tag is true, then return the value of markup
+ * and skip the remaining steps. The node is a leaf-node.
+ */
+ if (skipEndTag)
+ return markup;
+ /**
+ * 18. If ns is the HTML namespace, and the node's localName matches the
+ * string "template", then this is a template element. Append to markup the
+ * result of XML serializing a DocumentFragment node given the template
+ * element's template contents (a DocumentFragment), providing inherited
+ * ns, map, prefix index, and the require well-formed flag.
+ *
+ * _Note:_ This allows template content to round-trip, given the rules for
+ * parsing XHTML documents.
+ *
+ * 19. Otherwise, append to markup the result of running the XML
+ * serialization algorithm on each of node's children, in tree order,
+ * providing inherited ns, map, prefix index, and the require well-formed
+ * flag.
+ */
+ if (isHTML && node.localName === "template") {
+ // TODO: serialize template contents
+ }
+ else {
+ try {
+ for (var _b = __values(node._children || node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var childNode = _c.value;
+ markup += this._serializeNodeNS(childNode, inheritedNS, map, prefixIndex, requireWellFormed);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ }
+ /**
+ * 20. Append the following to markup, in the order listed:
+ * 20.1. "" (U+003C LESS-THAN SIGN, U+002F SOLIDUS);
+ * 20.2. The value of qualified name;
+ * 20.3. ">" (U+003E GREATER-THAN SIGN).
+ */
+ markup += "" + qualifiedName + ">";
+ /**
+ * 21. Return the value of markup.
+ */
+ return markup;
+ };
+ /**
+ * Produces an XML serialization of a document node.
+ *
+ * @param node - node to serialize
+ * @param namespace - context namespace
+ * @param prefixMap - namespace prefix map
+ * @param prefixIndex - generated namespace prefix index
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeDocumentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) {
+ var e_2, _a;
+ /**
+ * If the require well-formed flag is set (its value is true), and this node
+ * has no documentElement (the documentElement attribute's value is null),
+ * then throw an exception; the serialization of this node would not be a
+ * well-formed document.
+ */
+ if (requireWellFormed && node.documentElement === null) {
+ throw new Error("Missing document element (well-formed required).");
+ }
+ /**
+ * Otherwise, run the following steps:
+ * 1. Let serialized document be an empty string.
+ * 2. For each child child of node, in tree order, run the XML
+ * serialization algorithm on the child passing along the provided
+ * arguments, and append the result to serialized document.
+ *
+ * _Note:_ This will serialize any number of ProcessingInstruction and
+ * Comment nodes both before and after the Document's documentElement node,
+ * including at most one DocumentType node. (Text nodes are not allowed as
+ * children of the Document.)
+ *
+ * 3. Return the value of serialized document.
+ */
+ var serializedDocument = "";
+ try {
+ for (var _b = __values(node._children || node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var childNode = _c.value;
+ serializedDocument += this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed);
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ return serializedDocument;
+ };
+ /**
+ * Produces an XML serialization of a comment node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeComment = function (node, requireWellFormed) {
+ /**
+ * If the require well-formed flag is set (its value is true), and node's
+ * data contains characters that are not matched by the XML Char production
+ * or contains "--" (two adjacent U+002D HYPHEN-MINUS characters) or that
+ * ends with a "-" (U+002D HYPHEN-MINUS) character, then throw an exception;
+ * the serialization of this node's data would not be well-formed.
+ */
+ if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) ||
+ node.data.indexOf("--") !== -1 || node.data.endsWith("-"))) {
+ throw new Error("Comment data contains invalid characters (well-formed required).");
+ }
+ /**
+ * Otherwise, return the concatenation of "".
+ */
+ return "";
+ };
+ /**
+ * Produces an XML serialization of a text node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ * @param level - current depth of the XML tree
+ */
+ XMLSerializerImpl.prototype._serializeText = function (node, requireWellFormed) {
+ /**
+ * 1. If the require well-formed flag is set (its value is true), and
+ * node's data contains characters that are not matched by the XML Char
+ * production, then throw an exception; the serialization of this node's
+ * data would not be well-formed.
+ */
+ if (requireWellFormed && !algorithm_1.xml_isLegalChar(node.data)) {
+ throw new Error("Text data contains invalid characters (well-formed required).");
+ }
+ /**
+ * 2. Let markup be the value of node's data.
+ * 3. Replace any occurrences of "&" in markup by "&".
+ * 4. Replace any occurrences of "<" in markup by "<".
+ * 5. Replace any occurrences of ">" in markup by ">".
+ * 6. Return the value of markup.
+ */
+ var result = "";
+ for (var i = 0; i < node.data.length; i++) {
+ var c = node.data[i];
+ if (c === "&")
+ result += "&";
+ else if (c === "<")
+ result += "<";
+ else if (c === ">")
+ result += ">";
+ else
+ result += c;
+ }
+ return result;
+ };
+ /**
+ * Produces an XML serialization of a document fragment node.
+ *
+ * @param node - node to serialize
+ * @param namespace - context namespace
+ * @param prefixMap - namespace prefix map
+ * @param prefixIndex - generated namespace prefix index
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeDocumentFragmentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) {
+ var e_3, _a;
+ /**
+ * 1. Let markup the empty string.
+ * 2. For each child child of node, in tree order, run the XML serialization
+ * algorithm on the child given namespace, prefix map, a reference to prefix
+ * index, and flag require well-formed. Concatenate the result to markup.
+ * 3. Return the value of markup.
+ */
+ var markup = "";
+ try {
+ for (var _b = __values(node._children || node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var childNode = _c.value;
+ markup += this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed);
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ return markup;
+ };
+ /**
+ * Produces an XML serialization of a document type node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeDocumentType = function (node, requireWellFormed) {
+ /**
+ * 1. If the require well-formed flag is true and the node's publicId
+ * attribute contains characters that are not matched by the XML PubidChar
+ * production, then throw an exception; the serialization of this node
+ * would not be a well-formed document type declaration.
+ */
+ if (requireWellFormed && !algorithm_1.xml_isPubidChar(node.publicId)) {
+ throw new Error("DocType public identifier does not match PubidChar construct (well-formed required).");
+ }
+ /**
+ * 2. If the require well-formed flag is true and the node's systemId
+ * attribute contains characters that are not matched by the XML Char
+ * production or that contains both a """ (U+0022 QUOTATION MARK) and a
+ * "'" (U+0027 APOSTROPHE), then throw an exception; the serialization
+ * of this node would not be a well-formed document type declaration.
+ */
+ if (requireWellFormed &&
+ (!algorithm_1.xml_isLegalChar(node.systemId) ||
+ (node.systemId.indexOf('"') !== -1 && node.systemId.indexOf("'") !== -1))) {
+ throw new Error("DocType system identifier contains invalid characters (well-formed required).");
+ }
+ /**
+ * 3. Let markup be an empty string.
+ * 4. Append the string "" (U+003E GREATER-THAN SIGN) to markup.
+ * 11. Return the value of markup.
+ */
+ return node.publicId && node.systemId ?
+ ""
+ : node.publicId ?
+ ""
+ : node.systemId ?
+ ""
+ :
+ "";
+ };
+ /**
+ * Produces an XML serialization of a processing instruction node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeProcessingInstruction = function (node, requireWellFormed) {
+ /**
+ * 1. If the require well-formed flag is set (its value is true), and node's
+ * target contains a ":" (U+003A COLON) character or is an ASCII
+ * case-insensitive match for the string "xml", then throw an exception;
+ * the serialization of this node's target would not be well-formed.
+ */
+ if (requireWellFormed && (node.target.indexOf(":") !== -1 || (/^xml$/i).test(node.target))) {
+ throw new Error("Processing instruction target contains invalid characters (well-formed required).");
+ }
+ /**
+ * 2. If the require well-formed flag is set (its value is true), and node's
+ * data contains characters that are not matched by the XML Char production
+ * or contains the string "?>" (U+003F QUESTION MARK,
+ * U+003E GREATER-THAN SIGN), then throw an exception; the serialization of
+ * this node's data would not be well-formed.
+ */
+ if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) ||
+ node.data.indexOf("?>") !== -1)) {
+ throw new Error("Processing instruction data contains invalid characters (well-formed required).");
+ }
+ /**
+ * 3. Let markup be the concatenation of the following, in the order listed:
+ * 3.1. "" (U+003C LESS-THAN SIGN, U+003F QUESTION MARK);
+ * 3.2. The value of node's target;
+ * 3.3. " " (U+0020 SPACE);
+ * 3.4. The value of node's data;
+ * 3.5. "?>" (U+003F QUESTION MARK, U+003E GREATER-THAN SIGN).
+ * 4. Return the value of markup.
+ */
+ return "" + (node.data === "" ? node.target : node.target + " " + node.data) + "?>";
+ };
+ /**
+ * Produces an XML serialization of a CDATA node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeCData = function (node, requireWellFormed) {
+ if (requireWellFormed && (node.data.indexOf("]]>") !== -1)) {
+ throw new Error("CDATA contains invalid characters (well-formed required).");
+ }
+ return "";
+ };
+ /**
+ * Produces an XML serialization of the attributes of an element node.
+ *
+ * @param node - node to serialize
+ * @param map - namespace prefix map
+ * @param prefixIndex - generated namespace prefix index
+ * @param localPrefixesMap - local prefixes map
+ * @param ignoreNamespaceDefinitionAttribute - whether to ignore namespace
+ * attributes
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeAttributesNS = function (node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed) {
+ var e_4, _a;
+ /**
+ * 1. Let result be the empty string.
+ * 2. Let localname set be a new empty namespace localname set. This
+ * localname set will contain tuples of unique attribute namespaceURI and
+ * localName pairs, and is populated as each attr is processed. This set is
+ * used to [optionally] enforce the well-formed constraint that an element
+ * cannot have two attributes with the same namespaceURI and localName.
+ * This can occur when two otherwise identical attributes on the same
+ * element differ only by their prefix values.
+ */
+ var result = "";
+ var localNameSet = requireWellFormed ? new LocalNameSet_1.LocalNameSet() : undefined;
+ try {
+ /**
+ * 3. Loop: For each attribute attr in element's attributes, in the order
+ * they are specified in the element's attribute list:
+ */
+ for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var attr = _c.value;
+ // Optimize common case
+ if (!ignoreNamespaceDefinitionAttribute && !requireWellFormed && attr.namespaceURI === null) {
+ result += " " + attr.localName + "=\"" +
+ this._serializeAttributeValue(attr.value, requireWellFormed) + "\"";
+ continue;
+ }
+ /**
+ * 3.1. If the require well-formed flag is set (its value is true), and the
+ * localname set contains a tuple whose values match those of a new tuple
+ * consisting of attr's namespaceURI attribute and localName attribute,
+ * then throw an exception; the serialization of this attr would fail to
+ * produce a well-formed element serialization.
+ */
+ if (requireWellFormed && localNameSet && localNameSet.has(attr.namespaceURI, attr.localName)) {
+ throw new Error("Element contains duplicate attributes (well-formed required).");
+ }
+ /**
+ * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and
+ * localName attribute, and add it to the localname set.
+ * 3.3. Let attribute namespace be the value of attr's namespaceURI value.
+ * 3.4. Let candidate prefix be null.
+ */
+ if (requireWellFormed && localNameSet)
+ localNameSet.set(attr.namespaceURI, attr.localName);
+ var attributeNamespace = attr.namespaceURI;
+ var candidatePrefix = null;
+ /** 3.5. If attribute namespace is not null, then run these sub-steps: */
+ if (attributeNamespace !== null) {
+ /**
+ * 3.5.1. Let candidate prefix be the result of retrieving a preferred
+ * prefix string from map given namespace attribute namespace with
+ * preferred prefix being attr's prefix value.
+ */
+ candidatePrefix = map.get(attr.prefix, attributeNamespace);
+ /**
+ * 3.5.2. If the value of attribute namespace is the XMLNS namespace,
+ * then run these steps:
+ */
+ if (attributeNamespace === infra_1.namespace.XMLNS) {
+ /**
+ * 3.5.2.1. If any of the following are true, then stop running these
+ * steps and goto Loop to visit the next attribute:
+ * - the attr's value is the XML namespace;
+ * _Note:_ The XML namespace cannot be redeclared and survive
+ * round-tripping (unless it defines the prefix "xml"). To avoid this
+ * problem, this algorithm always prefixes elements in the XML
+ * namespace with "xml" and drops any related definitions as seen
+ * in the above condition.
+ * - the attr's prefix is null and the ignore namespace definition
+ * attribute flag is true (the Element's default namespace attribute
+ * should be skipped);
+ * - the attr's prefix is not null and either
+ * * the attr's localName is not a key contained in the local
+ * prefixes map, or
+ * * the attr's localName is present in the local prefixes map but
+ * the value of the key does not match attr's value
+ * and furthermore that the attr's localName (as the prefix to find)
+ * is found in the namespace prefix map given the namespace consisting
+ * of the attr's value (the current namespace prefix definition was
+ * exactly defined previously--on an ancestor element not the current
+ * element whose attributes are being processed).
+ */
+ if (attr.value === infra_1.namespace.XML ||
+ (attr.prefix === null && ignoreNamespaceDefinitionAttribute) ||
+ (attr.prefix !== null && (!(attr.localName in localPrefixesMap) ||
+ localPrefixesMap[attr.localName] !== attr.value) &&
+ map.has(attr.localName, attr.value)))
+ continue;
+ /**
+ * 3.5.2.2. If the require well-formed flag is set (its value is true),
+ * and the value of attr's value attribute matches the XMLNS
+ * namespace, then throw an exception; the serialization of this
+ * attribute would produce invalid XML because the XMLNS namespace
+ * is reserved and cannot be applied as an element's namespace via
+ * XML parsing.
+ *
+ * _Note:_ DOM APIs do allow creation of elements in the XMLNS
+ * namespace but with strict qualifications.
+ */
+ if (requireWellFormed && attr.value === infra_1.namespace.XMLNS) {
+ throw new Error("XMLNS namespace is reserved (well-formed required).");
+ }
+ /**
+ * 3.5.2.3. If the require well-formed flag is set (its value is true),
+ * and the value of attr's value attribute is the empty string, then
+ * throw an exception; namespace prefix declarations cannot be used
+ * to undeclare a namespace (use a default namespace declaration
+ * instead).
+ */
+ if (requireWellFormed && attr.value === '') {
+ throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).");
+ }
+ /**
+ * 3.5.2.4. the attr's prefix matches the string "xmlns", then let
+ * candidate prefix be the string "xmlns".
+ */
+ if (attr.prefix === 'xmlns')
+ candidatePrefix = 'xmlns';
+ /**
+ * 3.5.3. Otherwise, the attribute namespace is not the XMLNS namespace.
+ * Run these steps:
+ *
+ * _Note:_ The (candidatePrefix === null) check is not in the spec.
+ * We deviate from the spec here. Otherwise a prefix is generated for
+ * all attributes with namespaces.
+ */
+ }
+ else if (candidatePrefix === null) {
+ if (attr.prefix !== null &&
+ (!map.hasPrefix(attr.prefix) ||
+ map.has(attr.prefix, attributeNamespace))) {
+ /**
+ * Check if we can use the attribute's own prefix.
+ * We deviate from the spec here.
+ * TODO: This is not an efficient way of searching for prefixes.
+ * Follow developments to the spec.
+ */
+ candidatePrefix = attr.prefix;
+ }
+ else {
+ /**
+ * 3.5.3.1. Let candidate prefix be the result of generating a prefix
+ * providing map, attribute namespace, and prefix index as input.
+ */
+ candidatePrefix = this._generatePrefix(attributeNamespace, map, prefixIndex);
+ }
+ /**
+ * 3.5.3.2. Append the following to result, in the order listed:
+ * 3.5.3.2.1. " " (U+0020 SPACE);
+ * 3.5.3.2.2. The string "xmlns:";
+ * 3.5.3.2.3. The value of candidate prefix;
+ * 3.5.3.2.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
+ * 3.5.3.2.5. The result of serializing an attribute value given
+ * attribute namespace and the require well-formed flag as input;
+ * 3.5.3.2.6. """ (U+0022 QUOTATION MARK).
+ */
+ result += " xmlns:" + candidatePrefix + "=\"" +
+ this._serializeAttributeValue(attributeNamespace, requireWellFormed) + "\"";
+ }
+ }
+ /**
+ * 3.6. Append a " " (U+0020 SPACE) to result.
+ * 3.7. If candidate prefix is not null, then append to result the
+ * concatenation of candidate prefix with ":" (U+003A COLON).
+ */
+ result += " ";
+ if (candidatePrefix !== null) {
+ result += candidatePrefix + ':';
+ }
+ /**
+ * 3.8. If the require well-formed flag is set (its value is true), and
+ * this attr's localName attribute contains the character
+ * ":" (U+003A COLON) or does not match the XML Name production or
+ * equals "xmlns" and attribute namespace is null, then throw an
+ * exception; the serialization of this attr would not be a
+ * well-formed attribute.
+ */
+ if (requireWellFormed && (attr.localName.indexOf(":") !== -1 ||
+ !algorithm_1.xml_isName(attr.localName) ||
+ (attr.localName === "xmlns" && attributeNamespace === null))) {
+ throw new Error("Attribute local name contains invalid characters (well-formed required).");
+ }
+ /**
+ * 3.9. Append the following strings to result, in the order listed:
+ * 3.9.1. The value of attr's localName;
+ * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
+ * 3.9.3. The result of serializing an attribute value given attr's value
+ * attribute and the require well-formed flag as input;
+ * 3.9.4. """ (U+0022 QUOTATION MARK).
+ */
+ result += attr.localName + "=\"" +
+ this._serializeAttributeValue(attr.value, requireWellFormed) + "\"";
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+ /**
+ * 4. Return the value of result.
+ */
+ return result;
+ };
+ /**
+ * Records namespace information for the given element and returns the
+ * default namespace attribute value.
+ *
+ * @param node - element node to process
+ * @param map - namespace prefix map
+ * @param localPrefixesMap - local prefixes map
+ */
+ XMLSerializerImpl.prototype._recordNamespaceInformation = function (node, map, localPrefixesMap) {
+ var e_5, _a;
+ /**
+ * 1. Let default namespace attr value be null.
+ */
+ var defaultNamespaceAttrValue = null;
+ try {
+ /**
+ * 2. Main: For each attribute attr in element's attributes, in the order
+ * they are specified in the element's attribute list:
+ */
+ for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var attr = _c.value;
+ /**
+ * _Note:_ The following conditional steps find namespace prefixes. Only
+ * attributes in the XMLNS namespace are considered (e.g., attributes made
+ * to look like namespace declarations via
+ * setAttribute("xmlns:pretend-prefix", "pretend-namespace") are not
+ * included).
+ */
+ /** 2.1. Let attribute namespace be the value of attr's namespaceURI value. */
+ var attributeNamespace = attr.namespaceURI;
+ /** 2.2. Let attribute prefix be the value of attr's prefix. */
+ var attributePrefix = attr.prefix;
+ /** 2.3. If the attribute namespace is the XMLNS namespace, then: */
+ if (attributeNamespace === infra_1.namespace.XMLNS) {
+ /**
+ * 2.3.1. If attribute prefix is null, then attr is a default namespace
+ * declaration. Set the default namespace attr value to attr's value and
+ * stop running these steps, returning to Main to visit the next
+ * attribute.
+ */
+ if (attributePrefix === null) {
+ defaultNamespaceAttrValue = attr.value;
+ continue;
+ /**
+ * 2.3.2. Otherwise, the attribute prefix is not null and attr is a
+ * namespace prefix definition. Run the following steps:
+ */
+ }
+ else {
+ /** 2.3.2.1. Let prefix definition be the value of attr's localName. */
+ var prefixDefinition = attr.localName;
+ /** 2.3.2.2. Let namespace definition be the value of attr's value. */
+ var namespaceDefinition = attr.value;
+ /**
+ * 2.3.2.3. If namespace definition is the XML namespace, then stop
+ * running these steps, and return to Main to visit the next
+ * attribute.
+ *
+ * _Note:_ XML namespace definitions in prefixes are completely
+ * ignored (in order to avoid unnecessary work when there might be
+ * prefix conflicts). XML namespaced elements are always handled
+ * uniformly by prefixing (and overriding if necessary) the element's
+ * localname with the reserved "xml" prefix.
+ */
+ if (namespaceDefinition === infra_1.namespace.XML) {
+ continue;
+ }
+ /**
+ * 2.3.2.4. If namespace definition is the empty string (the
+ * declarative form of having no namespace), then let namespace
+ * definition be null instead.
+ */
+ if (namespaceDefinition === '') {
+ namespaceDefinition = null;
+ }
+ /**
+ * 2.3.2.5. If prefix definition is found in map given the namespace
+ * namespace definition, then stop running these steps, and return to
+ * Main to visit the next attribute.
+ *
+ * _Note:_ This step avoids adding duplicate prefix definitions for
+ * the same namespace in the map. This has the side-effect of avoiding
+ * later serialization of duplicate namespace prefix declarations in
+ * any descendant nodes.
+ */
+ if (map.has(prefixDefinition, namespaceDefinition)) {
+ continue;
+ }
+ /**
+ * 2.3.2.6. Add the prefix prefix definition to map given namespace
+ * namespace definition.
+ */
+ map.set(prefixDefinition, namespaceDefinition);
+ /**
+ * 2.3.2.7. Add the value of prefix definition as a new key to the
+ * local prefixes map, with the namespace definition as the key's
+ * value replacing the value of null with the empty string if
+ * applicable.
+ */
+ localPrefixesMap[prefixDefinition] = namespaceDefinition || '';
+ }
+ }
+ }
+ }
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_5) throw e_5.error; }
+ }
+ /**
+ * 3. Return the value of default namespace attr value.
+ *
+ * _Note:_ The empty string is a legitimate return value and is not
+ * converted to null.
+ */
+ return defaultNamespaceAttrValue;
+ };
+ /**
+ * Generates a new prefix for the given namespace.
+ *
+ * @param newNamespace - a namespace to generate prefix for
+ * @param prefixMap - namespace prefix map
+ * @param prefixIndex - generated namespace prefix index
+ */
+ XMLSerializerImpl.prototype._generatePrefix = function (newNamespace, prefixMap, prefixIndex) {
+ /**
+ * 1. Let generated prefix be the concatenation of the string "ns" and the
+ * current numerical value of prefix index.
+ * 2. Let the value of prefix index be incremented by one.
+ * 3. Add to map the generated prefix given the new namespace namespace.
+ * 4. Return the value of generated prefix.
+ */
+ var generatedPrefix = "ns" + prefixIndex.value;
+ prefixIndex.value++;
+ prefixMap.set(generatedPrefix, newNamespace);
+ return generatedPrefix;
+ };
+ /**
+ * Produces an XML serialization of an attribute value.
+ *
+ * @param value - attribute value
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeAttributeValue = function (value, requireWellFormed) {
+ /**
+ * From: https://w3c.github.io/DOM-Parsing/#dfn-serializing-an-attribute-value
+ *
+ * 1. If the require well-formed flag is set (its value is true), and
+ * attribute value contains characters that are not matched by the XML Char
+ * production, then throw an exception; the serialization of this attribute
+ * value would fail to produce a well-formed element serialization.
+ */
+ if (requireWellFormed && value !== null && !algorithm_1.xml_isLegalChar(value)) {
+ throw new Error("Invalid characters in attribute value.");
+ }
+ /**
+ * 2. If attribute value is null, then return the empty string.
+ */
+ if (value === null)
+ return "";
+ /**
+ * 3. Otherwise, attribute value is a string. Return the value of attribute
+ * value, first replacing any occurrences of the following:
+ * - "&" with "&"
+ * - """ with """
+ * - "<" with "<"
+ * - ">" with ">"
+ * NOTE
+ * This matches behavior present in browsers, and goes above and beyond the
+ * grammar requirement in the XML specification's AttValue production by
+ * also replacing ">" characters.
+ */
+ var result = "";
+ for (var i = 0; i < value.length; i++) {
+ var c = value[i];
+ if (c === "\"")
+ result += """;
+ else if (c === "&")
+ result += "&";
+ else if (c === "<")
+ result += "<";
+ else if (c === ">")
+ result += ">";
+ else
+ result += c;
+ }
+ return result;
+ };
+ /**
+ * Produces an XML serialization of an element node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeElement = function (node, requireWellFormed) {
+ var e_6, _a;
+ /**
+ * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node
+ *
+ * 1. If the require well-formed flag is set (its value is true), and this
+ * node's localName attribute contains the character ":" (U+003A COLON) or
+ * does not match the XML Name production, then throw an exception; the
+ * serialization of this node would not be a well-formed element.
+ */
+ if (requireWellFormed && (node.localName.indexOf(":") !== -1 ||
+ !algorithm_1.xml_isName(node.localName))) {
+ throw new Error("Node local name contains invalid characters (well-formed required).");
+ }
+ /**
+ * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN).
+ * 3. Let qualified name be an empty string.
+ * 4. Let skip end tag be a boolean flag with value false.
+ * 5. Let ignore namespace definition attribute be a boolean flag with value
+ * false.
+ * 6. Given prefix map, copy a namespace prefix map and let map be the
+ * result.
+ * 7. Let local prefixes map be an empty map. The map has unique Node prefix
+ * strings as its keys, with corresponding namespaceURI Node values as the
+ * map's key values (in this map, the null namespace is represented by the
+ * empty string).
+ *
+ * _Note:_ This map is local to each element. It is used to ensure there
+ * are no conflicting prefixes should a new namespace prefix attribute need
+ * to be generated. It is also used to enable skipping of duplicate prefix
+ * definitions when writing an element's attributes: the map allows the
+ * algorithm to distinguish between a prefix in the namespace prefix map
+ * that might be locally-defined (to the current Element) and one that is
+ * not.
+ * 8. Let local default namespace be the result of recording the namespace
+ * information for node given map and local prefixes map.
+ *
+ * _Note:_ The above step will update map with any found namespace prefix
+ * definitions, add the found prefix definitions to the local prefixes map
+ * and return a local default namespace value defined by a default namespace
+ * attribute if one exists. Otherwise it returns null.
+ * 9. Let inherited ns be a copy of namespace.
+ * 10. Let ns be the value of node's namespaceURI attribute.
+ */
+ var skipEndTag = false;
+ /** 11. If inherited ns is equal to ns, then: */
+ /**
+ * 11.1. If local default namespace is not null, then set ignore
+ * namespace definition attribute to true.
+ * 11.2. If ns is the XML namespace, then append to qualified name the
+ * concatenation of the string "xml:" and the value of node's localName.
+ * 11.3. Otherwise, append to qualified name the value of node's
+ * localName. The node's prefix if it exists, is dropped.
+ */
+ var qualifiedName = node.localName;
+ /** 11.4. Append the value of qualified name to markup. */
+ var markup = "<" + qualifiedName;
+ /**
+ * 13. Append to markup the result of the XML serialization of node's
+ * attributes given map, prefix index, local prefixes map, ignore namespace
+ * definition attribute flag, and require well-formed flag.
+ */
+ markup += this._serializeAttributes(node, requireWellFormed);
+ /**
+ * 14. If ns is the HTML namespace, and the node's list of children is
+ * empty, and the node's localName matches any one of the following void
+ * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed",
+ * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta",
+ * "param", "source", "track", "wbr"; then append the following to markup,
+ * in the order listed:
+ * 14.1. " " (U+0020 SPACE);
+ * 14.2. "/" (U+002F SOLIDUS).
+ * and set the skip end tag flag to true.
+ * 15. If ns is not the HTML namespace, and the node's list of children is
+ * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end
+ * tag flag to true.
+ * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup.
+ */
+ if (node._children.size === 0) {
+ markup += "/";
+ skipEndTag = true;
+ }
+ markup += ">";
+ /**
+ * 17. If the value of skip end tag is true, then return the value of markup
+ * and skip the remaining steps. The node is a leaf-node.
+ */
+ if (skipEndTag)
+ return markup;
+ try {
+ /**
+ * 18. If ns is the HTML namespace, and the node's localName matches the
+ * string "template", then this is a template element. Append to markup the
+ * result of XML serializing a DocumentFragment node given the template
+ * element's template contents (a DocumentFragment), providing inherited
+ * ns, map, prefix index, and the require well-formed flag.
+ *
+ * _Note:_ This allows template content to round-trip, given the rules for
+ * parsing XHTML documents.
+ *
+ * 19. Otherwise, append to markup the result of running the XML
+ * serialization algorithm on each of node's children, in tree order,
+ * providing inherited ns, map, prefix index, and the require well-formed
+ * flag.
+ */
+ for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var childNode = _c.value;
+ markup += this._serializeNode(childNode, requireWellFormed);
+ }
+ }
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_6) throw e_6.error; }
+ }
+ /**
+ * 20. Append the following to markup, in the order listed:
+ * 20.1. "" (U+003C LESS-THAN SIGN, U+002F SOLIDUS);
+ * 20.2. The value of qualified name;
+ * 20.3. ">" (U+003E GREATER-THAN SIGN).
+ */
+ markup += "" + qualifiedName + ">";
+ /**
+ * 21. Return the value of markup.
+ */
+ return markup;
+ };
+ /**
+ * Produces an XML serialization of a document node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeDocument = function (node, requireWellFormed) {
+ var e_7, _a;
+ /**
+ * If the require well-formed flag is set (its value is true), and this node
+ * has no documentElement (the documentElement attribute's value is null),
+ * then throw an exception; the serialization of this node would not be a
+ * well-formed document.
+ */
+ if (requireWellFormed && node.documentElement === null) {
+ throw new Error("Missing document element (well-formed required).");
+ }
+ /**
+ * Otherwise, run the following steps:
+ * 1. Let serialized document be an empty string.
+ * 2. For each child child of node, in tree order, run the XML
+ * serialization algorithm on the child passing along the provided
+ * arguments, and append the result to serialized document.
+ *
+ * _Note:_ This will serialize any number of ProcessingInstruction and
+ * Comment nodes both before and after the Document's documentElement node,
+ * including at most one DocumentType node. (Text nodes are not allowed as
+ * children of the Document.)
+ *
+ * 3. Return the value of serialized document.
+ */
+ var serializedDocument = "";
+ try {
+ for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var childNode = _c.value;
+ serializedDocument += this._serializeNode(childNode, requireWellFormed);
+ }
+ }
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_7) throw e_7.error; }
+ }
+ return serializedDocument;
+ };
+ /**
+ * Produces an XML serialization of a document fragment node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeDocumentFragment = function (node, requireWellFormed) {
+ var e_8, _a;
+ /**
+ * 1. Let markup the empty string.
+ * 2. For each child child of node, in tree order, run the XML serialization
+ * algorithm on the child given namespace, prefix map, a reference to prefix
+ * index, and flag require well-formed. Concatenate the result to markup.
+ * 3. Return the value of markup.
+ */
+ var markup = "";
+ try {
+ for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var childNode = _c.value;
+ markup += this._serializeNode(childNode, requireWellFormed);
+ }
+ }
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_8) throw e_8.error; }
+ }
+ return markup;
+ };
+ /**
+ * Produces an XML serialization of the attributes of an element node.
+ *
+ * @param node - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ XMLSerializerImpl.prototype._serializeAttributes = function (node, requireWellFormed) {
+ var e_9, _a;
+ /**
+ * 1. Let result be the empty string.
+ * 2. Let localname set be a new empty namespace localname set. This
+ * localname set will contain tuples of unique attribute namespaceURI and
+ * localName pairs, and is populated as each attr is processed. This set is
+ * used to [optionally] enforce the well-formed constraint that an element
+ * cannot have two attributes with the same namespaceURI and localName.
+ * This can occur when two otherwise identical attributes on the same
+ * element differ only by their prefix values.
+ */
+ var result = "";
+ var localNameSet = requireWellFormed ? {} : undefined;
+ try {
+ /**
+ * 3. Loop: For each attribute attr in element's attributes, in the order
+ * they are specified in the element's attribute list:
+ */
+ for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var attr = _c.value;
+ /**
+ * 3.1. If the require well-formed flag is set (its value is true), and the
+ * localname set contains a tuple whose values match those of a new tuple
+ * consisting of attr's namespaceURI attribute and localName attribute,
+ * then throw an exception; the serialization of this attr would fail to
+ * produce a well-formed element serialization.
+ */
+ if (requireWellFormed && localNameSet && (attr.localName in localNameSet)) {
+ throw new Error("Element contains duplicate attributes (well-formed required).");
+ }
+ /**
+ * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and
+ * localName attribute, and add it to the localname set.
+ * 3.3. Let attribute namespace be the value of attr's namespaceURI value.
+ * 3.4. Let candidate prefix be null.
+ */
+ if (requireWellFormed && localNameSet)
+ localNameSet[attr.localName] = true;
+ /** 3.5. If attribute namespace is not null, then run these sub-steps: */
+ /**
+ * 3.6. Append a " " (U+0020 SPACE) to result.
+ * 3.7. If candidate prefix is not null, then append to result the
+ * concatenation of candidate prefix with ":" (U+003A COLON).
+ */
+ /**
+ * 3.8. If the require well-formed flag is set (its value is true), and
+ * this attr's localName attribute contains the character
+ * ":" (U+003A COLON) or does not match the XML Name production or
+ * equals "xmlns" and attribute namespace is null, then throw an
+ * exception; the serialization of this attr would not be a
+ * well-formed attribute.
+ */
+ if (requireWellFormed && (attr.localName.indexOf(":") !== -1 ||
+ !algorithm_1.xml_isName(attr.localName))) {
+ throw new Error("Attribute local name contains invalid characters (well-formed required).");
+ }
+ /**
+ * 3.9. Append the following strings to result, in the order listed:
+ * 3.9.1. The value of attr's localName;
+ * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
+ * 3.9.3. The result of serializing an attribute value given attr's value
+ * attribute and the require well-formed flag as input;
+ * 3.9.4. """ (U+0022 QUOTATION MARK).
+ */
+ result += " " + attr.localName + "=\"" +
+ this._serializeAttributeValue(attr.value, requireWellFormed) + "\"";
+ }
+ }
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_9) throw e_9.error; }
+ }
+ /**
+ * 4. Return the value of result.
+ */
+ return result;
+ };
+ XMLSerializerImpl._VoidElementNames = new Set(['area', 'base', 'basefont',
+ 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen',
+ 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr']);
+ return XMLSerializerImpl;
+}());
+exports.XMLSerializerImpl = XMLSerializerImpl;
+//# sourceMappingURL=XMLSerializerImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js.map b/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js.map
new file mode 100644
index 0000000..cb0c60a
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"XMLSerializerImpl.js","sourceRoot":"","sources":["../../src/serializer/XMLSerializerImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,gDAG0B;AAC1B,+CAA6C;AAC7C,2DAAyD;AACzD,oDAAuD;AACvD,yCAA6D;AAC7D,0CAA2E;AAS3E;;;;GAIG;AACH;IAAA;IA87CA,CAAC;IAx7CC,kBAAkB;IAClB,6CAAiB,GAAjB,UAAkB,IAAU;QAC1B;;;;WAIG;QACH,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI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AiB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU;QACpE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ;QACxE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAA;IA07CnE,wBAAC;CAAA,AA97CD,IA87CC;AA97CY,8CAAiB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.d.ts b/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.d.ts
new file mode 100644
index 0000000..292f85f
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.d.ts
@@ -0,0 +1,2 @@
+import { Node } from "../dom/interfaces";
+export declare function serializeToString(root: Node): string;
diff --git a/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.js b/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.js
new file mode 100644
index 0000000..dfbc452
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.js
@@ -0,0 +1,962 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("../dom/interfaces");
+var infra_1 = require("@oozcitak/infra");
+var algorithm_1 = require("../algorithm");
+var util_1 = require("../util");
+var AbsoluteURLs;
+(function (AbsoluteURLs) {
+ AbsoluteURLs[AbsoluteURLs["kDoNotResolveURLs"] = 0] = "kDoNotResolveURLs";
+ AbsoluteURLs[AbsoluteURLs["kResolveAllURLs"] = 1] = "kResolveAllURLs";
+ AbsoluteURLs[AbsoluteURLs["kResolveNonLocalURLs"] = 2] = "kResolveNonLocalURLs";
+})(AbsoluteURLs || (AbsoluteURLs = {}));
+var SerializationType;
+(function (SerializationType) {
+ SerializationType[SerializationType["kHTML"] = 0] = "kHTML";
+ SerializationType[SerializationType["kXML"] = 1] = "kXML";
+})(SerializationType || (SerializationType = {}));
+var IncludeShadowRoots;
+(function (IncludeShadowRoots) {
+ IncludeShadowRoots[IncludeShadowRoots["kNoShadowRoots"] = 0] = "kNoShadowRoots";
+ IncludeShadowRoots[IncludeShadowRoots["kIncludeShadowRoots"] = 1] = "kIncludeShadowRoots";
+})(IncludeShadowRoots || (IncludeShadowRoots = {}));
+var ChildrenOnly;
+(function (ChildrenOnly) {
+ ChildrenOnly[ChildrenOnly["kIncludeNode"] = 0] = "kIncludeNode";
+ ChildrenOnly[ChildrenOnly["kChildrenOnly"] = 1] = "kChildrenOnly";
+})(ChildrenOnly || (ChildrenOnly = {}));
+var EntityMask;
+(function (EntityMask) {
+ EntityMask[EntityMask["kEntityAmp"] = 1] = "kEntityAmp";
+ EntityMask[EntityMask["kEntityLt"] = 2] = "kEntityLt";
+ EntityMask[EntityMask["kEntityGt"] = 4] = "kEntityGt";
+ EntityMask[EntityMask["kEntityQuot"] = 8] = "kEntityQuot";
+ EntityMask[EntityMask["kEntityNbsp"] = 16] = "kEntityNbsp";
+ EntityMask[EntityMask["kEntityTab"] = 32] = "kEntityTab";
+ EntityMask[EntityMask["kEntityLineFeed"] = 64] = "kEntityLineFeed";
+ EntityMask[EntityMask["kEntityCarriageReturn"] = 128] = "kEntityCarriageReturn";
+ // Non-breaking space needs to be escaped in innerHTML for compatibility
+ // reasons. See http://trac.webkit.org/changeset/32879. However, we cannot do
+ // this in an XML document because it does not have the entity reference
+ // defined (see bug 19215).
+ EntityMask[EntityMask["kEntityMaskInCDATA"] = 0] = "kEntityMaskInCDATA";
+ EntityMask[EntityMask["kEntityMaskInPCDATA"] = 7] = "kEntityMaskInPCDATA";
+ EntityMask[EntityMask["kEntityMaskInHTMLPCDATA"] = 23] = "kEntityMaskInHTMLPCDATA";
+ EntityMask[EntityMask["kEntityMaskInAttributeValue"] = 239] = "kEntityMaskInAttributeValue";
+ EntityMask[EntityMask["kEntityMaskInHTMLAttributeValue"] = 25] = "kEntityMaskInHTMLAttributeValue";
+})(EntityMask || (EntityMask = {}));
+;
+function serializeToString(root) {
+ var accumulator = new MarkupAccumulator(AbsoluteURLs.kDoNotResolveURLs, SerializationType.kXML, IncludeShadowRoots.kNoShadowRoots);
+ return accumulator.SerializeNodes(root, ChildrenOnly.kIncludeNode);
+}
+exports.serializeToString = serializeToString;
+function ElementCannotHaveEndTag(node) {
+ //auto* html_element = DynamicTo(node);
+ //if (!html_element) return false;
+ //return !html_element->ShouldSerializeEndTag();
+ return false;
+}
+function EqualIgnoringNullity(a, b) {
+ if (a === null && b !== null && b.length === 0)
+ return true;
+ if (b === null && a !== null && a.length === 0)
+ return true;
+ return a === b;
+}
+var MarkupAccumulator = /** @class */ (function () {
+ function MarkupAccumulator(resolve_urls_method, serialization_type, include_shadow_roots_) {
+ this.include_shadow_roots_ = include_shadow_roots_;
+ this.markup_ = { str: "" };
+ this.namespace_stack_ = [];
+ // https://w3c.github.io/DOM-Parsing/#dfn-generated-namespace-prefix-index
+ this.prefix_index_ = 1;
+ this.formatter_ = new MarkupFormatter(resolve_urls_method, serialization_type);
+ }
+ MarkupAccumulator.prototype.AppendEndTag = function (element, prefix) {
+ this.formatter_.AppendEndMarkup(this.markup_, element, prefix, element.localName);
+ };
+ MarkupAccumulator.prototype.AppendStartMarkup = function (node) {
+ if (util_1.Guard.isTextNode(node)) {
+ this.formatter_.AppendText(this.markup_, node);
+ }
+ else if (util_1.Guard.isAttrNode(node)) {
+ // Only XMLSerializer can pass an Attr. So, |documentIsHTML| flag is
+ // false.
+ this.formatter_.AppendAttributeValue(this.markup_, node.value, false);
+ }
+ else {
+ this.formatter_.AppendStartMarkup(this.markup_, node);
+ }
+ };
+ MarkupAccumulator.prototype.AppendCustomAttributes = function () { };
+ MarkupAccumulator.prototype.ShouldIgnoreAttribute = function () {
+ return false;
+ };
+ MarkupAccumulator.prototype.ShouldIgnoreElement = function () {
+ return false;
+ };
+ MarkupAccumulator.prototype.AppendElement = function (element) {
+ var e_1, _a, e_2, _b;
+ var data = this.AppendStartTagOpen(element);
+ if (this.SerializeAsHTML()) {
+ // https://html.spec.whatwg.org/C/#html-fragment-serialisation-algorithm
+ var attributes = element.attributes;
+ // 3.2. Element: If current node's is value is not null, and the
+ // element does not have an is attribute in its attribute list, ...
+ var is_value = element._is;
+ if (is_value !== null && attributes.getNamedItem("is") === undefined) {
+ var isAttr = algorithm_1.create_attr(element._nodeDocument, "is");
+ isAttr.value = is_value;
+ this.AppendAttribute(element, isAttr);
+ }
+ try {
+ for (var attributes_1 = __values(attributes), attributes_1_1 = attributes_1.next(); !attributes_1_1.done; attributes_1_1 = attributes_1.next()) {
+ var attribute = attributes_1_1.value;
+ if (!this.ShouldIgnoreAttribute())
+ this.AppendAttribute(element, attribute);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (attributes_1_1 && !attributes_1_1.done && (_a = attributes_1.return)) _a.call(attributes_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ }
+ else {
+ try {
+ // https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node
+ for (var _c = __values(element.attributes), _d = _c.next(); !_d.done; _d = _c.next()) {
+ var attribute = _d.value;
+ if (data.ignore_namespace_definition_attribute_ &&
+ attribute.namespaceURI == infra_1.namespace.XMLNS &&
+ attribute.prefix === "") {
+ // Drop xmlns= only if it's inconsistent with element's namespace.
+ // https://github.com/w3c/DOM-Parsing/issues/47
+ if (!EqualIgnoringNullity(attribute.value, element.namespaceURI))
+ continue;
+ }
+ if (!this.ShouldIgnoreAttribute())
+ this.AppendAttribute(element, attribute);
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ }
+ // Give an opportunity to subclasses to add their own attributes.
+ this.AppendCustomAttributes();
+ this.AppendStartTagClose(element);
+ return data.serialized_prefix_;
+ };
+ MarkupAccumulator.prototype.AppendStartTagOpen = function (element) {
+ var data = new ElementSerializationData();
+ data.serialized_prefix_ = element.prefix;
+ if (this.SerializeAsHTML()) {
+ this.formatter_.AppendStartTagOpen(this.markup_, element);
+ return data;
+ }
+ // https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node
+ var namespace_context = this.namespace_stack_[this.namespace_stack_.length - 1];
+ if (namespace_context === undefined) {
+ throw new Error("namespace_context is undefined");
+ }
+ // 5. Let ignore namespace definition attribute be a boolean flag with value
+ // false.
+ data.ignore_namespace_definition_attribute_ = false;
+ // 8. Let local default namespace be the result of recording the namespace
+ // information for node given map and local prefixes map.
+ var local_default_namespace = namespace_context.RecordNamespaceInformation(element);
+ // 9. Let inherited ns be a copy of namespace.
+ var inherited_ns = namespace_context.ContextNamespace();
+ // 10. Let ns be the value of node's namespaceURI attribute.
+ var ns = element.namespaceURI;
+ // 11. If inherited ns is equal to ns, then:
+ if (inherited_ns == ns) {
+ // 11.1. If local default namespace is not null, then set ignore namespace
+ // definition attribute to true.
+ data.ignore_namespace_definition_attribute_ = local_default_namespace !== null;
+ // 11.3. Otherwise, append to qualified name the value of node's
+ // localName. The node's prefix if it exists, is dropped.
+ // 11.4. Append the value of qualified name to markup.
+ this.formatter_.AppendStartTagOpen(this.markup_, null, element.localName);
+ data.serialized_prefix_ = null;
+ return data;
+ }
+ // 12. Otherwise, inherited ns is not equal to ns (the node's own namespace is
+ // different from the context namespace of its parent). Run these sub-steps:
+ // 12.1. Let prefix be the value of node's prefix attribute.
+ var prefix = element.prefix;
+ // 12.2. Let candidate prefix be the result of retrieving a preferred prefix
+ // string prefix from map given namespace ns.
+ var candidate_prefix = null;
+ if (ns && (prefix || ns != local_default_namespace)) {
+ candidate_prefix = this.RetrievePreferredPrefixString(ns, prefix);
+ }
+ // 12.4. if candidate prefix is not null (a namespace prefix is defined which
+ // maps to ns), then:
+ if (candidate_prefix !== null && this.LookupNamespaceURI(candidate_prefix)) {
+ // 12.4.1. Append to qualified name the concatenation of candidate prefix,
+ // ":" (U+003A COLON), and node's localName.
+ // 12.4.3. Append the value of qualified name to markup.
+ this.formatter_.AppendStartTagOpen(this.markup_, candidate_prefix, element.localName);
+ data.serialized_prefix_ = candidate_prefix;
+ // 12.4.2. If the local default namespace is not null (there exists a
+ // locally-defined default namespace declaration attribute) and its value is
+ // not the XML namespace, then let inherited ns get the value of local
+ // default namespace unless the local default namespace is the empty string
+ // in which case let it get null (the context namespace is changed to the
+ // declared default, rather than this node's own namespace).
+ if (local_default_namespace != infra_1.namespace.XML) {
+ namespace_context.InheritLocalDefaultNamespace(local_default_namespace);
+ }
+ return data;
+ }
+ // 12.5. Otherwise, if prefix is not null, then:
+ if (prefix) {
+ // 12.5.1. If the local prefixes map contains a key matching prefix, then
+ // let prefix be the result of generating a prefix providing as input map,
+ // ns, and prefix index
+ if (element.hasAttribute("xmlns:" + prefix)) {
+ prefix = this.GeneratePrefix(ns);
+ }
+ else {
+ // 12.5.2. Add prefix to map given namespace ns.
+ this.AddPrefix(prefix, ns);
+ }
+ // 12.5.3. Append to qualified name the concatenation of prefix, ":" (U+003A
+ // COLON), and node's localName.
+ // 12.5.4. Append the value of qualified name to markup.
+ this.formatter_.AppendStartTagOpen(this.markup_, prefix, element.localName);
+ data.serialized_prefix_ = prefix;
+ // 12.5.5. Append the following to markup, in the order listed:
+ this.formatter_.AppendAttribute(this.markup_, "xmlns", prefix, ns || "", false);
+ // 12.5.5.7. If local default namespace is not null (there exists a
+ // locally-defined default namespace declaration attribute), then let
+ // inherited ns get the value of local default namespace unless the local
+ // default namespace is the empty string in which case let it get null.
+ namespace_context.InheritLocalDefaultNamespace(local_default_namespace);
+ return data;
+ }
+ // 12.6. Otherwise, if local default namespace is null, or local default
+ // namespace is not null and its value is not equal to ns, then:
+ if (local_default_namespace === null ||
+ !EqualIgnoringNullity(local_default_namespace, ns)) {
+ // 12.6.1. Set the ignore namespace definition attribute flag to true.
+ data.ignore_namespace_definition_attribute_ = true;
+ // 12.6.3. Let the value of inherited ns be ns.
+ namespace_context.SetContextNamespace(ns);
+ // 12.6.4. Append the value of qualified name to markup.
+ this.formatter_.AppendStartTagOpen(this.markup_, element);
+ // 12.6.5. Append the following to markup, in the order listed:
+ this.formatter_.AppendAttribute(this.markup_, null, "xmlns", ns || "", false);
+ return data;
+ }
+ // 12.7. Otherwise, the node has a local default namespace that matches
+ // ns. Append to qualified name the value of node's localName, let the value
+ // of inherited ns be ns, and append the value of qualified name to markup.
+ console.assert(EqualIgnoringNullity(local_default_namespace, ns));
+ namespace_context.SetContextNamespace(ns);
+ this.formatter_.AppendStartTagOpen(this.markup_, element);
+ return data;
+ };
+ MarkupAccumulator.prototype.AppendStartTagClose = function (element) {
+ this.formatter_.AppendStartTagClose(this.markup_, element);
+ };
+ MarkupAccumulator.prototype.AppendAttribute = function (element, attribute) {
+ var value = this.formatter_.ResolveURLIfNeeded(element, attribute);
+ if (this.SerializeAsHTML()) {
+ this.formatter_.AppendAttributeAsHTML(this.markup_, attribute, value);
+ }
+ else {
+ this.AppendAttributeAsXMLWithNamespace(attribute, value);
+ }
+ };
+ MarkupAccumulator.prototype.AppendAttributeAsXMLWithNamespace = function (attribute, value) {
+ // https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
+ // 3.3. Let attribute namespace be the value of attr's namespaceURI value.
+ var attribute_namespace = attribute.namespaceURI;
+ // 3.4. Let candidate prefix be null.
+ var candidate_prefix = null;
+ if (attribute_namespace === null) {
+ this.formatter_.AppendAttribute(this.markup_, candidate_prefix, attribute.localName, value, false);
+ return;
+ }
+ // 3.5. If attribute namespace is not null, then run these sub-steps:
+ // 3.5.1. Let candidate prefix be the result of retrieving a preferred
+ // prefix string from map given namespace attribute namespace with preferred
+ // prefix being attr's prefix value.
+ candidate_prefix =
+ this.RetrievePreferredPrefixString(attribute_namespace, attribute.prefix);
+ // 3.5.2. If the value of attribute namespace is the XMLNS namespace, then
+ // run these steps:
+ if (attribute_namespace == infra_1.namespace.XMLNS) {
+ if (!attribute.prefix && attribute.localName !== "xmlns")
+ candidate_prefix = "xmlns";
+ }
+ else {
+ // 3.5.3. Otherwise, the attribute namespace in not the XMLNS namespace.
+ // Run these steps:
+ if (this.ShouldAddNamespaceAttribute(attribute, candidate_prefix)) {
+ if (!candidate_prefix || this.LookupNamespaceURI(candidate_prefix)) {
+ // 3.5.3.1. Let candidate prefix be the result of generating a prefix
+ // providing map, attribute namespace, and prefix index as input.
+ candidate_prefix = this.GeneratePrefix(attribute_namespace);
+ // 3.5.3.2. Append the following to result, in the order listed:
+ this.formatter_.AppendAttribute(this.markup_, "xmlns", candidate_prefix, attribute_namespace, false);
+ }
+ else {
+ this.AppendNamespace(candidate_prefix, attribute_namespace);
+ }
+ }
+ }
+ this.formatter_.AppendAttribute(this.markup_, candidate_prefix, attribute.localName, value, false);
+ };
+ MarkupAccumulator.prototype.ShouldAddNamespaceAttribute = function (attribute, candidate_prefix) {
+ // xmlns and xmlns:prefix attributes should be handled by another branch in
+ // AppendAttributeAsXMLWithNamespace().
+ console.assert(attribute.namespaceURI !== infra_1.namespace.XMLNS);
+ // Null namespace is checked earlier in AppendAttributeAsXMLWithNamespace().
+ console.assert(attribute.namespaceURI);
+ // Attributes without a prefix will need one generated for them, and an xmlns
+ // attribute for that prefix.
+ if (!candidate_prefix)
+ return true;
+ return !EqualIgnoringNullity(this.LookupNamespaceURI(candidate_prefix), attribute.namespaceURI);
+ };
+ MarkupAccumulator.prototype.AppendNamespace = function (prefix, namespace_uri) {
+ var found_uri = this.LookupNamespaceURI(prefix);
+ if (!EqualIgnoringNullity(found_uri, namespace_uri)) {
+ this.AddPrefix(prefix, namespace_uri);
+ if (!prefix) {
+ this.formatter_.AppendAttribute(this.markup_, null, "xmlns", namespace_uri, false);
+ }
+ else {
+ this.formatter_.AppendAttribute(this.markup_, "xmlns", prefix, namespace_uri, false);
+ }
+ }
+ };
+ MarkupAccumulator.prototype.PushNamespaces = function () {
+ if (this.SerializeAsHTML())
+ return;
+ console.assert(this.namespace_stack_.length > 0);
+ // TODO(tkent): Avoid to copy the whole map.
+ // We can't do |namespace_stack_.emplace_back(namespace_stack_.back())|
+ // because back() returns a reference in the vector backing, and
+ // emplace_back() can reallocate it.
+ this.namespace_stack_.push(this.namespace_stack_[this.namespace_stack_.length - 1].Clone());
+ };
+ MarkupAccumulator.prototype.PopNamespaces = function () {
+ if (this.SerializeAsHTML())
+ return;
+ this.namespace_stack_.pop();
+ };
+ // https://w3c.github.io/DOM-Parsing/#dfn-retrieving-a-preferred-prefix-string
+ MarkupAccumulator.prototype.RetrievePreferredPrefixString = function (ns, preferred_prefix) {
+ var e_3, _a;
+ console.assert(ns);
+ var ns_for_preferred = this.LookupNamespaceURI(preferred_prefix);
+ // Preserve the prefix if the prefix is used in the scope and the namespace
+ // for it is matches to the node's one.
+ // This is equivalent to the following step in the specification:
+ // 2.1. If prefix matches preferred prefix, then stop running these steps and
+ // return prefix.
+ if (preferred_prefix && ns_for_preferred !== null &&
+ EqualIgnoringNullity(ns_for_preferred, ns))
+ return preferred_prefix;
+ var candidate_list = this.namespace_stack_[this.namespace_stack_.length - 1].PrefixList(ns);
+ try {
+ // Get the last effective prefix.
+ //
+ //
+ //
+ // el2.setAttributeNS(U1, 'n', 'v');
+ // We should get 'p'.
+ //
+ //
+ // el1.setAttributeNS(U1, 'n', 'v');
+ // We should not get '' for attributes.
+ for (var candidate_list_1 = __values(candidate_list), candidate_list_1_1 = candidate_list_1.next(); !candidate_list_1_1.done; candidate_list_1_1 = candidate_list_1.next()) {
+ var candidate_prefix = candidate_list_1_1.value;
+ console.assert(candidate_prefix);
+ var ns_for_candidate = this.LookupNamespaceURI(candidate_prefix);
+ if (EqualIgnoringNullity(ns_for_candidate, ns))
+ return candidate_prefix;
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (candidate_list_1_1 && !candidate_list_1_1.done && (_a = candidate_list_1.return)) _a.call(candidate_list_1);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ // No prefixes for |ns|.
+ // Preserve the prefix if the prefix is not used in the current scope.
+ if (preferred_prefix && ns_for_preferred === null)
+ return preferred_prefix;
+ // If a prefix is not specified, or the prefix is mapped to a
+ // different namespace, we should generate new prefix.
+ return null;
+ };
+ MarkupAccumulator.prototype.AddPrefix = function (prefix, namespace_uri) {
+ this.namespace_stack_[this.namespace_stack_.length - 1].Add(prefix, namespace_uri);
+ };
+ MarkupAccumulator.prototype.LookupNamespaceURI = function (prefix) {
+ return this.namespace_stack_[this.namespace_stack_.length - 1].LookupNamespaceURI(prefix);
+ };
+ // https://w3c.github.io/DOM-Parsing/#dfn-generating-a-prefix
+ MarkupAccumulator.prototype.GeneratePrefix = function (new_namespace) {
+ var generated_prefix = "";
+ do {
+ // 1. Let generated prefix be the concatenation of the string "ns" and the
+ // current numerical value of prefix index.
+ generated_prefix = "ns" + this.prefix_index_.toString();
+ // 2. Let the value of prefix index be incremented by one.
+ this.prefix_index_++;
+ } while (this.LookupNamespaceURI(generated_prefix));
+ // 3. Add to map the generated prefix given the new namespace namespace.
+ this.AddPrefix(generated_prefix, new_namespace);
+ // 4. Return the value of generated prefix.
+ return generated_prefix;
+ };
+ MarkupAccumulator.prototype.SerializeAsHTML = function () {
+ return this.formatter_.SerializeAsHTML();
+ };
+ MarkupAccumulator.prototype.GetAuxiliaryDOMTree = function (element) {
+ var shadow_root = element._shadowRoot;
+ if (!shadow_root || this.include_shadow_roots_ != IncludeShadowRoots.kIncludeShadowRoots)
+ return [null, null];
+ var shadowroot_type = shadow_root._mode;
+ // Wrap the shadowroot into a declarative Shadow DOM
+ // element.
+ var template_element = algorithm_1.create_element(element._nodeDocument, "template", null, null);
+ template_element.setAttribute("shadowroot", shadowroot_type);
+ return [shadow_root, template_element];
+ };
+ MarkupAccumulator.prototype.SerializeNodesWithNamespaces = function (target_node, children_only) {
+ var e_4, _a, e_5, _b, e_6, _c;
+ if (!util_1.Guard.isElementNode(target_node)) {
+ if (!children_only)
+ this.AppendStartMarkup(target_node);
+ try {
+ for (var _d = __values(target_node._children), _e = _d.next(); !_e.done; _e = _d.next()) {
+ var child = _e.value;
+ this.SerializeNodesWithNamespaces(child, ChildrenOnly.kIncludeNode);
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+ return;
+ }
+ var target_element = target_node;
+ if (this.ShouldIgnoreElement())
+ return;
+ this.PushNamespaces();
+ var prefix_override = null;
+ if (!children_only)
+ prefix_override = this.AppendElement(target_element);
+ var has_end_tag = !(this.SerializeAsHTML() && ElementCannotHaveEndTag(target_element));
+ if (has_end_tag) {
+ var parent = target_element;
+ try {
+ // if (auto * template_element = DynamicTo(target_element))
+ // parent = template_element -> content()
+ for (var _f = __values(parent._children), _g = _f.next(); !_g.done; _g = _f.next()) {
+ var child = _g.value;
+ this.SerializeNodesWithNamespaces(child, ChildrenOnly.kIncludeNode);
+ }
+ }
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
+ finally {
+ try {
+ if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
+ }
+ finally { if (e_5) throw e_5.error; }
+ }
+ // Traverses other DOM tree, i.e., shadow tree.
+ var _h = __read(this.GetAuxiliaryDOMTree(target_element), 2), auxiliary_tree = _h[0], enclosing_element = _h[1];
+ if (auxiliary_tree) {
+ var enclosing_element_prefix = null;
+ if (enclosing_element) {
+ enclosing_element_prefix = this.AppendElement(enclosing_element);
+ }
+ try {
+ for (var _j = __values(auxiliary_tree._children), _k = _j.next(); !_k.done; _k = _j.next()) {
+ var child = _k.value;
+ this.SerializeNodesWithNamespaces(child, ChildrenOnly.kIncludeNode);
+ }
+ }
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
+ finally {
+ try {
+ if (_k && !_k.done && (_c = _j.return)) _c.call(_j);
+ }
+ finally { if (e_6) throw e_6.error; }
+ }
+ if (enclosing_element) {
+ this.AppendEndTag(enclosing_element, enclosing_element_prefix);
+ }
+ }
+ if (!children_only) {
+ this.AppendEndTag(target_element, prefix_override);
+ }
+ }
+ this.PopNamespaces();
+ };
+ MarkupAccumulator.prototype.SerializeNodes = function (target_node, children_only) {
+ if (!this.SerializeAsHTML()) {
+ // https://w3c.github.io/DOM-Parsing/#dfn-xml-serialization
+ // 2. Let prefix map be a new namespace prefix map.
+ this.namespace_stack_ = [];
+ this.namespace_stack_.push(new NamespaceContext());
+ // 3. Add the XML namespace with prefix value "xml" to prefix map.
+ this.AddPrefix("xml", infra_1.namespace.XML);
+ // 4. Let prefix index be a generated namespace prefix index with value 1.
+ this.prefix_index_ = 1;
+ }
+ this.SerializeNodesWithNamespaces(target_node, children_only);
+ return this.ToString();
+ };
+ MarkupAccumulator.prototype.ToString = function () { return this.markup_.str; };
+ return MarkupAccumulator;
+}());
+var NamespaceContext = /** @class */ (function () {
+ function NamespaceContext() {
+ this.prefix_ns_map_ = new Map();
+ // Map a namespace URI to a list of prefixes.
+ // https://w3c.github.io/DOM-Parsing/#the-namespace-prefix-map
+ this.ns_prefixes_map_ = new Map();
+ // https://w3c.github.io/DOM-Parsing/#dfn-context-namespace
+ this.context_namespace_ = null;
+ }
+ // https://w3c.github.io/DOM-Parsing/#dfn-add
+ //
+ // This function doesn't accept empty prefix and empty namespace URI.
+ // - The default namespace is managed separately.
+ // - Namespace URI never be empty if the prefix is not empty.
+ NamespaceContext.prototype.Add = function (prefix, namespace_uri) {
+ if (prefix === null)
+ throw new Error("prefix should not be empty.");
+ if (namespace_uri === null)
+ throw new Error("namespace_uri should not be empty.");
+ this.prefix_ns_map_.set(prefix, namespace_uri);
+ this.ns_prefixes_map_.set(namespace_uri, [prefix]);
+ };
+ // https://w3c.github.io/DOM-Parsing/#dfn-recording-the-namespace-information
+ NamespaceContext.prototype.RecordNamespaceInformation = function (element) {
+ var e_7, _a;
+ var local_default_namespace = "";
+ try {
+ // 2. For each attribute attr in element's attributes, in the order they are
+ // specified in the element's attribute list:
+ for (var _b = __values(element.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var attr = _c.value;
+ // We don't check xmlns namespace of attr here because xmlns attributes in
+ // HTML documents don't have namespace URI. Some web tests serialize
+ // HTML documents with XMLSerializer, and Firefox has the same behavior.
+ if (attr.prefix === "" && attr.localName === "xmlns") {
+ // 3.1. If attribute prefix is null, then attr is a default namespace
+ // declaration. Set the default namespace attr value to attr's value
+ // and stop running these steps, returning to Main to visit the next
+ // attribute.
+ local_default_namespace = attr.value;
+ }
+ else if (attr.prefix == "xmlns") {
+ this.Add(attr.prefix ? attr.localName : "", attr.value);
+ }
+ }
+ }
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_7) throw e_7.error; }
+ }
+ // 3. Return the value of default namespace attr value.
+ return local_default_namespace;
+ };
+ NamespaceContext.prototype.LookupNamespaceURI = function (prefix) {
+ if (prefix === null)
+ return "";
+ return this.prefix_ns_map_.get(prefix) || "";
+ };
+ NamespaceContext.prototype.ContextNamespace = function () { return this.context_namespace_; };
+ NamespaceContext.prototype.SetContextNamespace = function (context_ns) {
+ this.context_namespace_ = context_ns;
+ };
+ NamespaceContext.prototype.InheritLocalDefaultNamespace = function (local_default_namespace) {
+ if (!local_default_namespace) {
+ return;
+ }
+ this.SetContextNamespace(local_default_namespace === "" ?
+ null : local_default_namespace);
+ };
+ NamespaceContext.prototype.PrefixList = function (ns) {
+ return this.ns_prefixes_map_.get(ns ? ns : "") || [];
+ };
+ NamespaceContext.prototype.Clone = function () {
+ var e_8, _a, e_9, _b;
+ var clone = new NamespaceContext();
+ try {
+ for (var _c = __values(this.prefix_ns_map_), _d = _c.next(); !_d.done; _d = _c.next()) {
+ var _e = __read(_d.value, 2), key = _e[0], val = _e[1];
+ clone.prefix_ns_map_.set(key, val);
+ }
+ }
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
+ finally {
+ try {
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
+ }
+ finally { if (e_8) throw e_8.error; }
+ }
+ try {
+ for (var _f = __values(this.ns_prefixes_map_), _g = _f.next(); !_g.done; _g = _f.next()) {
+ var _h = __read(_g.value, 2), key = _h[0], val = _h[1];
+ clone.ns_prefixes_map_.set(key, val.slice());
+ }
+ }
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
+ finally {
+ try {
+ if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
+ }
+ finally { if (e_9) throw e_9.error; }
+ }
+ clone.context_namespace_ = this.context_namespace_;
+ return clone;
+ };
+ return NamespaceContext;
+}());
+// This stores values used to serialize an element. The values are not
+// inherited to child node serialization.
+var ElementSerializationData = /** @class */ (function () {
+ function ElementSerializationData() {
+ // https://w3c.github.io/DOM-Parsing/#dfn-ignore-namespace-definition-attribute
+ this.ignore_namespace_definition_attribute_ = false;
+ this.serialized_prefix_ = null;
+ }
+ return ElementSerializationData;
+}());
+var MarkupFormatter = /** @class */ (function () {
+ function MarkupFormatter(resolve_urls_method_, serialization_type_) {
+ this.resolve_urls_method_ = resolve_urls_method_;
+ this.serialization_type_ = serialization_type_;
+ }
+ MarkupFormatter.prototype.SerializeAsHTML = function () {
+ return this.serialization_type_ == SerializationType.kHTML;
+ };
+ MarkupFormatter.prototype.ResolveURLIfNeeded = function (element, attribute) {
+ var value = attribute.value;
+ /*
+ switch (this.resolve_urls_method_) {
+ case AbsoluteURLs.kResolveAllURLs:
+ if (element.IsURLAttribute(attribute))
+ return element.GetDocument().CompleteURL(value).GetString()
+ break
+
+ case AbsoluteURLs.kResolveNonLocalURLs:
+ if (element.IsURLAttribute(attribute) &&
+ !element.GetDocument().Url().IsLocalFile())
+ return element.GetDocument().CompleteURL(value).GetString()
+ break
+
+ case AbsoluteURLs.kDoNotResolveURLs:
+ break
+ }
+ */
+ return value;
+ };
+ MarkupFormatter.prototype.EntityMaskForText = function (text) {
+ if (!this.SerializeAsHTML()) {
+ return EntityMask.kEntityMaskInPCDATA;
+ }
+ /**
+ // TODO(hajimehoshi): We need to switch EditingStrategy.
+ parent_name = text.parentElement?._qualifiedName
+
+ if (parent_name === "script" ||
+ parent_name === "style" ||
+ parent_name === "xmp" ||
+ parent_name === "iframe" ||
+ parent_name === "plaintext" ||
+ parent_name === "noembed" ||
+ parent_name === "noframes" ||
+ (parent_name === "noscript" &&
+ text.GetDocument().GetFrame() &&
+ text.GetDocument().CanExecuteScripts(kNotAboutToExecuteScript))))
+ return kEntityMaskInCDATA;
+ */
+ return EntityMask.kEntityMaskInHTMLPCDATA;
+ };
+ MarkupFormatter.prototype.AppendAttribute = function (result, prefix, local_name, value, document_is_html) {
+ result.str += ' ';
+ if (prefix) {
+ result.str += prefix;
+ result.str += ':';
+ }
+ result.str += local_name;
+ result.str += "=\"";
+ this.AppendAttributeValue(result, value, document_is_html);
+ result.str += '"';
+ };
+ MarkupFormatter.prototype.AppendAttributeAsHTML = function (result, attribute, value) {
+ // https://html.spec.whatwg.org/C/#attribute's-serialised-name
+ var _a = __read(algorithm_1.namespace_extractQName(attribute._qualifiedName), 2), prefix = _a[0], localName = _a[1];
+ if (attribute.namespaceURI === infra_1.namespace.XMLNS) {
+ if (!prefix && localName !== "xmlns")
+ prefix = "xmlns";
+ }
+ else if (attribute.namespaceURI === infra_1.namespace.XML) {
+ prefix = "xml";
+ }
+ else if (attribute.namespaceURI === infra_1.namespace.XLink) {
+ prefix = "xlink";
+ }
+ this.AppendAttribute(result, prefix, localName, value, true);
+ };
+ MarkupFormatter.prototype.AppendAttributeAsXMLWithoutNamespace = function (result, attribute, value) {
+ var attribute_namespace = attribute.namespaceURI;
+ var candidate_prefix = attribute.prefix;
+ if (attribute_namespace === infra_1.namespace.XMLNS) {
+ if (!attribute.prefix && attribute.localName != "xmlns")
+ candidate_prefix = "xmlns";
+ }
+ else if (attribute_namespace === infra_1.namespace.XML) {
+ if (!candidate_prefix)
+ candidate_prefix = "xml";
+ }
+ else if (attribute_namespace == infra_1.namespace.XLink) {
+ if (!candidate_prefix)
+ candidate_prefix = "xlink";
+ }
+ this.AppendAttribute(result, candidate_prefix, attribute.localName, value, false);
+ };
+ MarkupFormatter.prototype.AppendAttributeValue = function (result, attribute, document_is_html) {
+ this.AppendCharactersReplacingEntities(result, attribute, 0, attribute.length, document_is_html ? EntityMask.kEntityMaskInHTMLAttributeValue : EntityMask.kEntityMaskInAttributeValue);
+ };
+ MarkupFormatter.prototype.AppendStartMarkup = function (result, node) {
+ switch (node.nodeType) {
+ case interfaces_1.NodeType.Text:
+ break;
+ case interfaces_1.NodeType.Comment:
+ this.AppendComment(result, node.data);
+ break;
+ case interfaces_1.NodeType.Document:
+ this.AppendXMLDeclaration(result, node);
+ break;
+ case interfaces_1.NodeType.DocumentFragment:
+ break;
+ case interfaces_1.NodeType.DocumentType:
+ this.AppendDocumentType(result, node);
+ break;
+ case interfaces_1.NodeType.ProcessingInstruction:
+ this.AppendProcessingInstruction(result, node.target, node.data);
+ break;
+ case interfaces_1.NodeType.Element:
+ break;
+ case interfaces_1.NodeType.CData:
+ this.AppendCDATASection(result, node.data);
+ break;
+ case interfaces_1.NodeType.Attribute:
+ break;
+ }
+ };
+ MarkupFormatter.prototype.AppendEndMarkup = function (result, element, prefix, local_name) {
+ if (prefix === void 0) { prefix = element.prefix; }
+ if (local_name === void 0) { local_name = element.localName; }
+ if (this.ShouldSelfClose(element) || (!element.hasChildNodes() && ElementCannotHaveEndTag(element))) {
+ return;
+ }
+ result.str += "";
+ if (prefix) {
+ result.str += prefix + ':';
+ }
+ result.str += local_name + '>';
+ };
+ MarkupFormatter.prototype.AppendStartTagOpen = function (result, elementOrPrefix, local_name) {
+ var prefix = util_1.Guard.isElementNode(elementOrPrefix) ? elementOrPrefix.prefix : elementOrPrefix;
+ var localName = util_1.Guard.isElementNode(elementOrPrefix) ? elementOrPrefix.localName : (local_name || "");
+ result.str += '<';
+ if (prefix) {
+ result.str += prefix;
+ result.str += ":";
+ }
+ result.str += localName;
+ };
+ MarkupFormatter.prototype.AppendStartTagClose = function (result, element) {
+ if (this.ShouldSelfClose(element)) {
+ //if (element.IsHTMLElement())
+ // result.Append(' ') // XHTML 1.0 <-> HTML compatibility.
+ result.str += '/';
+ }
+ result.str += '>';
+ };
+ MarkupFormatter.prototype.AppendText = function (result, text) {
+ var str = text.data;
+ this.AppendCharactersReplacingEntities(result, str, 0, str.length, this.EntityMaskForText(text));
+ };
+ MarkupFormatter.prototype.AppendComment = function (result, comment) {
+ // FIXME: Comment content is not escaped, but XMLSerializer (and possibly
+ // other callers) should raise an exception if it includes "-->".
+ result.str += "";
+ };
+ MarkupFormatter.prototype.AppendXMLDeclaration = function (result, document) {
+ /*
+ if (!document.HasXMLDeclaration())
+ return
+
+ result.Append("")
+ */
+ };
+ MarkupFormatter.prototype.AppendDocumentType = function (result, n) {
+ if (!n.name)
+ return;
+ result.str += "";
+ };
+ MarkupFormatter.prototype.AppendProcessingInstruction = function (result, target, data) {
+ // FIXME: PI data is not escaped, but XMLSerializer (and possibly other
+ // callers) this should raise an exception if it includes "?>".
+ result.str += "" + target + ' ' + data + "?>";
+ };
+ MarkupFormatter.prototype.AppendCDATASection = function (result, section) {
+ // FIXME: CDATA content is not escaped, but XMLSerializer (and possibly other
+ // callers) should raise an exception if it includes "]]>".
+ result.str += "";
+ };
+ // Rules of self-closure
+ // 1. No elements in HTML documents use the self-closing syntax.
+ // 2. Elements w/ children never self-close because they use a separate end tag.
+ // 3. HTML elements which do not listed in spec will close with a
+ // separate end tag.
+ // 4. Other elements self-close.
+ MarkupFormatter.prototype.ShouldSelfClose = function (element) {
+ if (this.SerializeAsHTML())
+ return false;
+ else if (element.hasChildNodes())
+ return false;
+ else if (false && !ElementCannotHaveEndTag(element))
+ return false;
+ else
+ return true;
+ };
+ MarkupFormatter.prototype.AppendCharactersReplacingEntities = function (result, source, offset, length, entity_mask) {
+ /*
+ DEFINE_STATIC_LOCAL(const std:: string, amp_reference, ("&"));
+ DEFINE_STATIC_LOCAL(const std:: string, lt_reference, ("<"));
+ DEFINE_STATIC_LOCAL(const std:: string, gt_reference, (">"));
+ DEFINE_STATIC_LOCAL(const std:: string, quot_reference, ("""));
+ DEFINE_STATIC_LOCAL(const std:: string, nbsp_reference, (" "));
+ DEFINE_STATIC_LOCAL(const std:: string, tab_reference, (" "));
+ DEFINE_STATIC_LOCAL(const std:: string, line_feed_reference, ("
"));
+ DEFINE_STATIC_LOCAL(const std:: string, carriage_return_reference, ("
"));
+
+ static const EntityDescription kEntityMaps[] = {
+ { '&', amp_reference, kEntityAmp },
+ { '<', lt_reference, kEntityLt },
+ { '>', gt_reference, kEntityGt },
+ { '"', quot_reference, kEntityQuot },
+ { kNoBreakSpaceCharacter, nbsp_reference, kEntityNbsp },
+ { '\t', tab_reference, kEntityTab },
+ { '\n', line_feed_reference, kEntityLineFeed },
+ { '\r', carriage_return_reference, kEntityCarriageReturn },
+ };
+ */
+ if (!(offset + length))
+ return;
+ console.assert(offset + length <= source.length);
+ /*
+ StringBuilder& result,
+ CharType* text,
+ unsigned length,
+ const EntityDescription entity_maps[],
+ unsigned entity_maps_count,
+ EntityMask entity_mask) {
+ unsigned position_after_last_entity = 0;
+ for (unsigned i = 0; i < length; ++i) {
+ for (unsigned entity_index = 0; entity_index < entity_maps_count;
+ ++entity_index) {
+ if (text[i] == entity_maps[entity_index].entity &&
+ entity_maps[entity_index].mask & entity_mask) {
+ result.Append(text + position_after_last_entity,
+ i - position_after_last_entity);
+ const std::string& replacement = entity_maps[entity_index].reference;
+ result.Append(replacement.c_str(), replacement.length());
+ position_after_last_entity = i + 1;
+ break;
+ }
+ }
+ }
+ result.Append(text + position_after_last_entity,
+ length - position_after_last_entity);
+ */
+ result.str += source;
+ };
+ return MarkupFormatter;
+}());
+//# sourceMappingURL=XMLSerializerImpl2.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.js.map b/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.js.map
new file mode 100644
index 0000000..5fd229e
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"XMLSerializerImpl2.js","sourceRoot":"","sources":["../../src/serializer/XMLSerializerImpl2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAG0B;AAC1B,yCAA6D;AAC7D,0CAAkF;AAClF,gCAA+B;AAE/B,IAAK,YAAyE;AAA9E,WAAK,YAAY;IAAG,yEAAiB,CAAA;IAAE,qEAAe,CAAA;IAAE,+EAAoB,CAAA;AAAC,CAAC,EAAzE,YAAY,KAAZ,YAAY,QAA6D;AAC9E,IAAK,iBAAiC;AAAtC,WAAK,iBAAiB;IAAG,2DAAK,CAAA;IAAE,yDAAI,CAAA;AAAC,CAAC,EAAjC,iBAAiB,KAAjB,iBAAiB,QAAgB;AACtC,IAAK,kBAA0D;AAA/D,WAAK,kBAAkB;IAAG,+EAAc,CAAA;IAAE,yFAAmB,CAAA;AAAC,CAAC,EAA1D,kBAAkB,KAAlB,kBAAkB,QA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B,UAA4B,MAAuB,EAAE,MAAc,EAAE,IAAY;QAC/E,uEAAuE;QACvE,+DAA+D;QAC/D,MAAM,CAAC,GAAG,IAAI,IAAI,GAAG,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAA;IACjD,CAAC;IAED,4CAAkB,GAAlB,UAAmB,MAAuB,EAAE,OAAe;QACzD,6EAA6E;QAC7E,2DAA2D;QAC3D,MAAM,CAAC,GAAG,IAAI,WAAW,GAAG,OAAO,GAAG,KAAK,CAAA;IAC7C,CAAC;IAED,wBAAwB;IACxB,gEAAgE;IAChE,gFAAgF;IAChF,iEAAiE;IACjE,oBAAoB;IACpB,gCAAgC;IAChC,yCAAe,GAAf,UAAgB,OAAgB;QAC9B,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,OAAO,KAAK,CAAA;aACT,IAAI,OAAO,CAAC,aAAa,EAAE;YAC9B,OAAO,KAAK,CAAA;aACT,IAAI,KAAK,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC;YACjD,OAAO,KAAK,CAAA;;YAEZ,OAAO,IAAI,CAAA;IACf,CAAC;IAED,2DAAiC,GAAjC,UAAkC,MAAuB,EAAE,MAAc,EAAE,MAAc,EAAE,MAAc,EAAE,WAAuB;QAChI;;;;;;;;;;;;;;;;;;;;MAoBF;QACE,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;YACpB,OAAM;QAER,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,CAAA;QAEhD;;;;;;;;;;;;;;;;;;;;;;;;WAwBG;QACH,MAAM,CAAC,GAAG,IAAI,MAAM,CAAA;IACtB,CAAC;IAEH,sBAAC;AAAD,CAAC,AAzSD,IAySC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/serializer/index.d.ts b/node_modules/@oozcitak/dom/lib/serializer/index.d.ts
new file mode 100644
index 0000000..b662be9
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/index.d.ts
@@ -0,0 +1 @@
+export { XMLSerializerImpl as XMLSerializer } from "./XMLSerializerImpl";
diff --git a/node_modules/@oozcitak/dom/lib/serializer/index.js b/node_modules/@oozcitak/dom/lib/serializer/index.js
new file mode 100644
index 0000000..c4eea52
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/index.js
@@ -0,0 +1,6 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+// Export classes
+var XMLSerializerImpl_1 = require("./XMLSerializerImpl");
+exports.XMLSerializer = XMLSerializerImpl_1.XMLSerializerImpl;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/serializer/index.js.map b/node_modules/@oozcitak/dom/lib/serializer/index.js.map
new file mode 100644
index 0000000..8512c69
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/serializer/index.ts"],"names":[],"mappings":";;AAAA,iBAAiB;AACjB,yDAAwE;AAA/D,4CAAA,iBAAiB,CAAiB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/serializer/interfaces.d.ts b/node_modules/@oozcitak/dom/lib/serializer/interfaces.d.ts
new file mode 100644
index 0000000..a2ffef5
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/interfaces.d.ts
@@ -0,0 +1,15 @@
+import { Node } from "../dom/interfaces";
+/**
+ * Represents an XML serializer.
+ *
+ * Implements: https://www.w3.org/TR/DOM-Parsing/#serializing
+ */
+export interface XMLSerializer {
+ /**
+ * Produces an XML serialization of the given node.
+ *
+ * @param root - node to serialize
+ * @param requireWellFormed - whether to check conformance
+ */
+ serializeToString(root: Node): string;
+}
diff --git a/node_modules/@oozcitak/dom/lib/serializer/interfaces.js b/node_modules/@oozcitak/dom/lib/serializer/interfaces.js
new file mode 100644
index 0000000..db91911
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/interfaces.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=interfaces.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/serializer/interfaces.js.map b/node_modules/@oozcitak/dom/lib/serializer/interfaces.js.map
new file mode 100644
index 0000000..98bc678
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/serializer/interfaces.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/serializer/interfaces.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/util/Cast.d.ts b/node_modules/@oozcitak/dom/lib/util/Cast.d.ts
new file mode 100644
index 0000000..70c8579
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/util/Cast.d.ts
@@ -0,0 +1,12 @@
+import { Node } from "../dom/interfaces";
+/**
+ * Contains type casts for DOM objects.
+ */
+export declare class Cast {
+ /**
+ * Casts the given object to a `Node`.
+ *
+ * @param a - the object to cast
+ */
+ static asNode(a: any): Node;
+}
diff --git a/node_modules/@oozcitak/dom/lib/util/Cast.js b/node_modules/@oozcitak/dom/lib/util/Cast.js
new file mode 100644
index 0000000..713eaea
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/util/Cast.js
@@ -0,0 +1,26 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var Guard_1 = require("./Guard");
+/**
+ * Contains type casts for DOM objects.
+ */
+var Cast = /** @class */ (function () {
+ function Cast() {
+ }
+ /**
+ * Casts the given object to a `Node`.
+ *
+ * @param a - the object to cast
+ */
+ Cast.asNode = function (a) {
+ if (Guard_1.Guard.isNode(a)) {
+ return a;
+ }
+ else {
+ throw new Error("Invalid object. Node expected.");
+ }
+ };
+ return Cast;
+}());
+exports.Cast = Cast;
+//# sourceMappingURL=Cast.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/util/Cast.js.map b/node_modules/@oozcitak/dom/lib/util/Cast.js.map
new file mode 100644
index 0000000..f1dcd3a
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/util/Cast.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Cast.js","sourceRoot":"","sources":["../../src/util/Cast.ts"],"names":[],"mappings":";;AACA,iCAA+B;AAE/B;;GAEG;AACH;IAAA;IAcA,CAAC;IAZC;;;;OAIG;IACI,WAAM,GAAb,UAAc,CAAM;QAClB,IAAI,aAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YACnB,OAAO,CAAC,CAAA;SACT;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;SAClD;IACH,CAAC;IACH,WAAC;AAAD,CAAC,AAdD,IAcC;AAdY,oBAAI"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/util/EmptySet.d.ts b/node_modules/@oozcitak/dom/lib/util/EmptySet.d.ts
new file mode 100644
index 0000000..d719577
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/util/EmptySet.d.ts
@@ -0,0 +1,13 @@
+export declare class EmptySet implements Set {
+ get size(): number;
+ add(value: T): this;
+ clear(): void;
+ delete(value: T): boolean;
+ forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: any): void;
+ has(value: T): boolean;
+ [Symbol.iterator](): IterableIterator;
+ entries(): IterableIterator<[T, T]>;
+ keys(): IterableIterator;
+ values(): IterableIterator;
+ get [Symbol.toStringTag](): string;
+}
diff --git a/node_modules/@oozcitak/dom/lib/util/EmptySet.js b/node_modules/@oozcitak/dom/lib/util/EmptySet.js
new file mode 100644
index 0000000..5ad87fe
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/util/EmptySet.js
@@ -0,0 +1,61 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var EmptySet = /** @class */ (function () {
+ function EmptySet() {
+ }
+ Object.defineProperty(EmptySet.prototype, "size", {
+ get: function () {
+ return 0;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ EmptySet.prototype.add = function (value) {
+ throw new Error("Cannot add to an empty set.");
+ };
+ EmptySet.prototype.clear = function () {
+ // no-op
+ };
+ EmptySet.prototype.delete = function (value) {
+ return false;
+ };
+ EmptySet.prototype.forEach = function (callbackfn, thisArg) {
+ // no-op
+ };
+ EmptySet.prototype.has = function (value) {
+ return false;
+ };
+ EmptySet.prototype[Symbol.iterator] = function () {
+ return new EmptySetIterator();
+ };
+ EmptySet.prototype.entries = function () {
+ return new EmptySetIterator();
+ };
+ EmptySet.prototype.keys = function () {
+ return new EmptySetIterator();
+ };
+ EmptySet.prototype.values = function () {
+ return new EmptySetIterator();
+ };
+ Object.defineProperty(EmptySet.prototype, Symbol.toStringTag, {
+ get: function () {
+ return "EmptySet";
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return EmptySet;
+}());
+exports.EmptySet = EmptySet;
+var EmptySetIterator = /** @class */ (function () {
+ function EmptySetIterator() {
+ }
+ EmptySetIterator.prototype[Symbol.iterator] = function () {
+ return this;
+ };
+ EmptySetIterator.prototype.next = function () {
+ return { done: true, value: null };
+ };
+ return EmptySetIterator;
+}());
+//# sourceMappingURL=EmptySet.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/util/EmptySet.js.map b/node_modules/@oozcitak/dom/lib/util/EmptySet.js.map
new file mode 100644
index 0000000..cca9baf
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/util/EmptySet.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"EmptySet.js","sourceRoot":"","sources":["../../src/util/EmptySet.ts"],"names":[],"mappings":";;AAAA;IAAA;IA6CA,CAAC;IA3CC,sBAAI,0BAAI;aAAR;YACE,OAAO,CAAC,CAAA;QACV,CAAC;;;OAAA;IAED,sBAAG,GAAH,UAAI,KAAQ;QACV,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IAED,wBAAK,GAAL;QACE,QAAQ;IACV,CAAC;IAED,yBAAM,GAAN,UAAO,KAAQ;QACb,OAAO,KAAK,CAAA;IACd,CAAC;IAED,0BAAO,GAAP,UAAQ,UAAsD,EAAE,OAAa;QAC3E,QAAQ;IACV,CAAC;IAED,sBAAG,GAAH,UAAI,KAAQ;QACV,OAAO,KAAK,CAAA;IACd,CAAC;IAED,mBAAC,MAAM,CAAC,QAAQ,CAAC,GAAjB;QACE,OAAO,IAAI,gBAAgB,EAAK,CAAA;IAClC,CAAC;IAED,0BAAO,GAAP;QACE,OAAO,IAAI,gBAAgB,EAAU,CAAA;IACvC,CAAC;IAED,uBAAI,GAAJ;QACE,OAAO,IAAI,gBAAgB,EAAK,CAAA;IAClC,CAAC;IAED,yBAAM,GAAN;QACE,OAAO,IAAI,gBAAgB,EAAK,CAAA;IAClC,CAAC;IAED,sBAAI,oBAAC,MAAM,CAAC,WAAY;aAAxB;YACE,OAAO,UAAU,CAAA;QACnB,CAAC;;;OAAA;IACH,eAAC;AAAD,CAAC,AA7CD,IA6CC;AA7CY,4BAAQ;AA+CrB;IAAA;IAQA,CAAC;IAPC,2BAAC,MAAM,CAAC,QAAQ,CAAC,GAAjB;QACE,OAAO,IAAI,CAAA;IACb,CAAC;IAED,+BAAI,GAAJ;QACE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;IACpC,CAAC;IACH,uBAAC;AAAD,CAAC,AARD,IAQC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/util/Guard.d.ts b/node_modules/@oozcitak/dom/lib/util/Guard.d.ts
new file mode 100644
index 0000000..6c40d6b
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/util/Guard.d.ts
@@ -0,0 +1,135 @@
+import { RegisteredObserver, TransientRegisteredObserver, EventListener, MouseEvent, Slotable, Node, Text, Element, ShadowRoot, CharacterData, Document, DocumentType, Attr, Comment, ProcessingInstruction, Slot, Window, CDATASection, DocumentFragment } from "../dom/interfaces";
+/**
+ * Contains user-defined type guards for DOM objects.
+ */
+export declare class Guard {
+ /**
+ * Determines if the given object is a `Node`.
+ *
+ * @param a - the object to check
+ */
+ static isNode(a: any): a is Node;
+ /**
+ * Determines if the given object is a `Document`.
+ *
+ * @param a - the object to check
+ */
+ static isDocumentNode(a: any): a is Document;
+ /**
+ * Determines if the given object is a `DocumentType`.
+ *
+ * @param a - the object to check
+ */
+ static isDocumentTypeNode(a: any): a is DocumentType;
+ /**
+ * Determines if the given object is a `DocumentFragment`.
+ *
+ * @param a - the object to check
+ */
+ static isDocumentFragmentNode(a: any): a is DocumentFragment;
+ /**
+ * Determines if the given object is a `Attr`.
+ *
+ * @param a - the object to check
+ */
+ static isAttrNode(a: any): a is Attr;
+ /**
+ * Determines if the given node is a `CharacterData` node.
+ *
+ * @param a - the object to check
+ */
+ static isCharacterDataNode(a: any): a is CharacterData;
+ /**
+ * Determines if the given object is a `Text` or a `CDATASection`.
+ *
+ * @param a - the object to check
+ */
+ static isTextNode(a: any): a is Text;
+ /**
+ * Determines if the given object is a `Text`.
+ *
+ * @param a - the object to check
+ */
+ static isExclusiveTextNode(a: any): a is Text;
+ /**
+ * Determines if the given object is a `CDATASection`.
+ *
+ * @param a - the object to check
+ */
+ static isCDATASectionNode(a: any): a is CDATASection;
+ /**
+ * Determines if the given object is a `Comment`.
+ *
+ * @param a - the object to check
+ */
+ static isCommentNode(a: any): a is Comment;
+ /**
+ * Determines if the given object is a `ProcessingInstruction`.
+ *
+ * @param a - the object to check
+ */
+ static isProcessingInstructionNode(a: any): a is ProcessingInstruction;
+ /**
+ * Determines if the given object is an `Element`.
+ *
+ * @param a - the object to check
+ */
+ static isElementNode(a: any): a is Element;
+ /**
+ * Determines if the given object is a custom `Element`.
+ *
+ * @param a - the object to check
+ */
+ static isCustomElementNode(a: any): a is Element;
+ /**
+ * Determines if the given object is a `ShadowRoot`.
+ *
+ * @param a - the object to check
+ */
+ static isShadowRoot(a: any): a is ShadowRoot;
+ /**
+ * Determines if the given object is a `MouseEvent`.
+ *
+ * @param a - the object to check
+ */
+ static isMouseEvent(a: any): a is MouseEvent;
+ /**
+ * Determines if the given object is a slotable.
+ *
+ * Element and Text nodes are slotables. A slotable has an associated name
+ * (a string).
+ *
+ * @param a - the object to check
+ */
+ static isSlotable(a: any): a is Slotable;
+ /**
+ * Determines if the given object is a slot.
+ *
+ * @param a - the object to check
+ */
+ static isSlot(a: any): a is Slot;
+ /**
+ * Determines if the given object is a `Window`.
+ *
+ * @param a - the object to check
+ */
+ static isWindow(a: any): a is Window;
+ /**
+ * Determines if the given object is an `EventListener`.
+ *
+ * @param a - the object to check
+ */
+ static isEventListener(a: any): a is EventListener;
+ /**
+ * Determines if the given object is a `RegisteredObserver`.
+ *
+ * @param a - the object to check
+ */
+ static isRegisteredObserver(a: any): a is RegisteredObserver;
+ /**
+ * Determines if the given object is a `TransientRegisteredObserver`.
+ *
+ * @param a - the object to check
+ */
+ static isTransientRegisteredObserver(a: any): a is TransientRegisteredObserver;
+}
diff --git a/node_modules/@oozcitak/dom/lib/util/Guard.js b/node_modules/@oozcitak/dom/lib/util/Guard.js
new file mode 100644
index 0000000..fc79bc1
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/util/Guard.js
@@ -0,0 +1,192 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var interfaces_1 = require("../dom/interfaces");
+/**
+ * Contains user-defined type guards for DOM objects.
+ */
+var Guard = /** @class */ (function () {
+ function Guard() {
+ }
+ /**
+ * Determines if the given object is a `Node`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isNode = function (a) {
+ return (!!a && a._nodeType !== undefined);
+ };
+ /**
+ * Determines if the given object is a `Document`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isDocumentNode = function (a) {
+ return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Document);
+ };
+ /**
+ * Determines if the given object is a `DocumentType`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isDocumentTypeNode = function (a) {
+ return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.DocumentType);
+ };
+ /**
+ * Determines if the given object is a `DocumentFragment`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isDocumentFragmentNode = function (a) {
+ return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.DocumentFragment);
+ };
+ /**
+ * Determines if the given object is a `Attr`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isAttrNode = function (a) {
+ return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Attribute);
+ };
+ /**
+ * Determines if the given node is a `CharacterData` node.
+ *
+ * @param a - the object to check
+ */
+ Guard.isCharacterDataNode = function (a) {
+ if (!Guard.isNode(a))
+ return false;
+ var type = a._nodeType;
+ return (type === interfaces_1.NodeType.Text ||
+ type === interfaces_1.NodeType.ProcessingInstruction ||
+ type === interfaces_1.NodeType.Comment ||
+ type === interfaces_1.NodeType.CData);
+ };
+ /**
+ * Determines if the given object is a `Text` or a `CDATASection`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isTextNode = function (a) {
+ return (Guard.isNode(a) && (a._nodeType === interfaces_1.NodeType.Text || a._nodeType === interfaces_1.NodeType.CData));
+ };
+ /**
+ * Determines if the given object is a `Text`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isExclusiveTextNode = function (a) {
+ return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Text);
+ };
+ /**
+ * Determines if the given object is a `CDATASection`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isCDATASectionNode = function (a) {
+ return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.CData);
+ };
+ /**
+ * Determines if the given object is a `Comment`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isCommentNode = function (a) {
+ return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Comment);
+ };
+ /**
+ * Determines if the given object is a `ProcessingInstruction`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isProcessingInstructionNode = function (a) {
+ return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.ProcessingInstruction);
+ };
+ /**
+ * Determines if the given object is an `Element`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isElementNode = function (a) {
+ return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Element);
+ };
+ /**
+ * Determines if the given object is a custom `Element`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isCustomElementNode = function (a) {
+ return (Guard.isElementNode(a) && a._customElementState === "custom");
+ };
+ /**
+ * Determines if the given object is a `ShadowRoot`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isShadowRoot = function (a) {
+ return (!!a && a.host !== undefined);
+ };
+ /**
+ * Determines if the given object is a `MouseEvent`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isMouseEvent = function (a) {
+ return (!!a && a.screenX !== undefined && a.screenY != undefined);
+ };
+ /**
+ * Determines if the given object is a slotable.
+ *
+ * Element and Text nodes are slotables. A slotable has an associated name
+ * (a string).
+ *
+ * @param a - the object to check
+ */
+ Guard.isSlotable = function (a) {
+ return (!!a && a._name !== undefined && a._assignedSlot !== undefined &&
+ (Guard.isTextNode(a) || Guard.isElementNode(a)));
+ };
+ /**
+ * Determines if the given object is a slot.
+ *
+ * @param a - the object to check
+ */
+ Guard.isSlot = function (a) {
+ return (!!a && a._name !== undefined && a._assignedNodes !== undefined &&
+ Guard.isElementNode(a));
+ };
+ /**
+ * Determines if the given object is a `Window`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isWindow = function (a) {
+ return (!!a && a.navigator !== undefined);
+ };
+ /**
+ * Determines if the given object is an `EventListener`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isEventListener = function (a) {
+ return (!!a && a.handleEvent !== undefined);
+ };
+ /**
+ * Determines if the given object is a `RegisteredObserver`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isRegisteredObserver = function (a) {
+ return (!!a && a.observer !== undefined && a.options !== undefined);
+ };
+ /**
+ * Determines if the given object is a `TransientRegisteredObserver`.
+ *
+ * @param a - the object to check
+ */
+ Guard.isTransientRegisteredObserver = function (a) {
+ return (!!a && a.source !== undefined && Guard.isRegisteredObserver(a));
+ };
+ return Guard;
+}());
+exports.Guard = Guard;
+//# sourceMappingURL=Guard.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/util/Guard.js.map b/node_modules/@oozcitak/dom/lib/util/Guard.js.map
new file mode 100644
index 0000000..72aee9f
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/util/Guard.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Guard.js","sourceRoot":"","sources":["../../src/util/Guard.ts"],"names":[],"mappings":";;AAAA,gDAK0B;AAE1B;;GAEG;AACH;IAAA;IA0MA,CAAC;IAxMC;;;;OAIG;IACI,YAAM,GAAb,UAAc,CAAM;QAClB,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAA;IAC3C,CAAC;IAED;;;;OAIG;IACI,oBAAc,GAArB,UAAsB,CAAM;QAC1B,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,qBAAQ,CAAC,QAAQ,CAAC,CAAA;IAC/D,CAAC;IAED;;;;OAIG;IACI,wBAAkB,GAAzB,UAA0B,CAAM;QAC9B,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,qBAAQ,CAAC,YAAY,CAAC,CAAA;IACnE,CAAC;IAED;;;;OAIG;IACI,4BAAsB,GAA7B,UAA8B,CAAM;QAClC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,qBAAQ,CAAC,gBAAgB,CAAC,CAAA;IACvE,CAAC;IAED;;;;OAIG;IACI,gBAAU,GAAjB,UAAkB,CAAM;QACtB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,qBAAQ,CAA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,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IAC3B,CAAC;IAED;;;;OAIG;IACI,cAAQ,GAAf,UAAgB,CAAM;QACpB,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAA;IAC3C,CAAC;IAED;;;;OAIG;IACI,qBAAe,GAAtB,UAAuB,CAAM;QAC3B,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,KAAK,SAAS,CAAC,CAAA;IAC7C,CAAC;IAED;;;;OAIG;IACI,0BAAoB,GAA3B,UAA4B,CAAM;QAChC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO,KAAK,SAAS,CAAC,CAAA;IACrE,CAAC;IAED;;;;KAIC;IACM,mCAA6B,GAApC,UAAqC,CAAM;QACzC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAA;IACzE,CAAC;IACH,YAAC;AAAD,CAAC,AA1MD,IA0MC;AA1MY,sBAAK"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/util/index.d.ts b/node_modules/@oozcitak/dom/lib/util/index.d.ts
new file mode 100644
index 0000000..106d502
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/util/index.d.ts
@@ -0,0 +1,3 @@
+export { Cast } from "./Cast";
+export { Guard } from "./Guard";
+export { EmptySet } from "./EmptySet";
diff --git a/node_modules/@oozcitak/dom/lib/util/index.js b/node_modules/@oozcitak/dom/lib/util/index.js
new file mode 100644
index 0000000..55e5d97
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/util/index.js
@@ -0,0 +1,9 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var Cast_1 = require("./Cast");
+exports.Cast = Cast_1.Cast;
+var Guard_1 = require("./Guard");
+exports.Guard = Guard_1.Guard;
+var EmptySet_1 = require("./EmptySet");
+exports.EmptySet = EmptySet_1.EmptySet;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/lib/util/index.js.map b/node_modules/@oozcitak/dom/lib/util/index.js.map
new file mode 100644
index 0000000..6a129ab
--- /dev/null
+++ b/node_modules/@oozcitak/dom/lib/util/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";;AAAA,+BAA6B;AAApB,sBAAA,IAAI,CAAA;AACb,iCAA+B;AAAtB,wBAAA,KAAK,CAAA;AACd,uCAAqC;AAA5B,8BAAA,QAAQ,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/dom/package.json b/node_modules/@oozcitak/dom/package.json
new file mode 100644
index 0000000..8da00ce
--- /dev/null
+++ b/node_modules/@oozcitak/dom/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "@oozcitak/dom",
+ "version": "1.15.8",
+ "keywords": [
+ "dom",
+ "whatwg"
+ ],
+ "homepage": "http://github.com/oozcitak/dom",
+ "description": "A modern DOM implementation",
+ "author": "Ozgur Ozcitak ",
+ "contributors": [],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/oozcitak/dom.git"
+ },
+ "bugs": {
+ "url": "http://github.com/oozcitak/dom/issues"
+ },
+ "main": "./lib/index",
+ "engines": {
+ "node": ">=8.0"
+ },
+ "files": [
+ "lib/**/*"
+ ],
+ "dependencies": {
+ "@oozcitak/infra": "1.0.8",
+ "@oozcitak/url": "1.0.4",
+ "@oozcitak/util": "8.3.8"
+ },
+ "devDependencies": {
+ "@types/benchmark": "*",
+ "@types/dedent": "*",
+ "@types/jest": "*",
+ "@types/jsdom": "*",
+ "@types/node": "*",
+ "@types/semver": "*",
+ "@types/xmldom": "*",
+ "benchmark": "*",
+ "chalk": "*",
+ "dedent": "*",
+ "fast-xml-parser": "*",
+ "glob": "*",
+ "jest": "*",
+ "jsdom": "*",
+ "semver": "*",
+ "ts-jest": "*",
+ "ts-node": "*",
+ "typescript": "*",
+ "xmldom": "*"
+ },
+ "jest": {
+ "transform": {
+ "^.+\\.tsx?$": "ts-jest"
+ },
+ "testRegex": "/test/.*\\.test\\.tsx?$",
+ "testEnvironment": "node",
+ "collectCoverageFrom": [
+ "src/**/*.{ts,tsx}"
+ ]
+ },
+ "scripts": {
+ "compile": "rm -rf lib && tsc --version && tsc",
+ "test": "npm run compile && jest --coverage",
+ "perf": "npm run compile && ts-node ./perf/perf.ts",
+ "prof-create": "npm run compile && rm -f isolate-*-v8.log && node --prof ./perf/prof-create.js && find . -name isolate-*-v8.log -exec mv {} isolate-v8.log ; && node --prof-process isolate-v8.log > isolate-create.log && rm isolate-v8.log",
+ "prof-parse": "npm run compile && rm -f isolate-*-v8.log && node --prof ./perf/prof-parse.js && find . -name isolate-*-v8.log -exec mv {} isolate-v8.log ; && node --prof-process isolate-v8.log > isolate-parse.log && rm isolate-v8.log",
+ "prof-serialize": "npm run compile && rm -f isolate-*-v8.log && node --prof ./perf/prof-serialize.js && find . -name isolate-*-v8.log -exec mv {} isolate-v8.log ; && node --prof-process isolate-v8.log > isolate-serialize.log && rm isolate-v8.log",
+ "publish-public": "npm run test && npm publish --access public"
+ }
+}
diff --git a/node_modules/@oozcitak/infra/LICENSE b/node_modules/@oozcitak/infra/LICENSE
new file mode 100644
index 0000000..eee50f6
--- /dev/null
+++ b/node_modules/@oozcitak/infra/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 Ozgur Ozcitak
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@oozcitak/infra/README.md b/node_modules/@oozcitak/infra/README.md
new file mode 100644
index 0000000..c811d95
--- /dev/null
+++ b/node_modules/@oozcitak/infra/README.md
@@ -0,0 +1,13 @@
+# infra
+A Javascript implementation of the [Infra Living Standard](https://infra.spec.whatwg.org/).
+
+[![License](http://img.shields.io/npm/l/@oozcitak/infra.svg?style=flat-square)](http://opensource.org/licenses/MIT)
+[![NPM Version](http://img.shields.io/npm/v/@oozcitak/infra.svg?style=flat-square)](https://www.npmjs.com/package/@oozcitak/infra)
+
+[![Travis Build Status](http://img.shields.io/travis/oozcitak/infra.svg?style=flat-square)](http://travis-ci.org/oozcitak/infra)
+[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/eq3de0oihhp9p5h2?svg=true)](https://ci.appveyor.com/project/oozcitak/infra)
+[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/infra.svg?style=flat-square)](https://david-dm.org/oozcitak/infra)
+[![Code Coverage](https://img.shields.io/codecov/c/github/oozcitak/infra?style=flat-square)](https://codecov.io/gh/oozcitak/infra)
+
+# version
+Current version implements the standard as of commit [d4a3e90](https://infra.spec.whatwg.org/commit-snapshots/d4a3e9003e6695e3e1379a8581d945759566bfac/).
diff --git a/node_modules/@oozcitak/infra/lib/Base64.d.ts b/node_modules/@oozcitak/infra/lib/Base64.d.ts
new file mode 100644
index 0000000..8b10d19
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Base64.d.ts
@@ -0,0 +1,12 @@
+/**
+ * Base-64 encodes the given string.
+ *
+ * @param input - a string
+ */
+export declare function forgivingBase64Encode(input: string): string;
+/**
+ * Decodes a base-64 string.
+ *
+ * @param input - a string
+ */
+export declare function forgivingBase64Decode(input: string): string | null;
diff --git a/node_modules/@oozcitak/infra/lib/Base64.js b/node_modules/@oozcitak/infra/lib/Base64.js
new file mode 100644
index 0000000..973b728
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Base64.js
@@ -0,0 +1,82 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var CodePoints_1 = require("./CodePoints");
+/**
+ * Base-64 encodes the given string.
+ *
+ * @param input - a string
+ */
+function forgivingBase64Encode(input) {
+ /**
+ * To forgiving-base64 encode given a byte sequence data, apply the base64
+ * algorithm defined in section 4 of RFC 4648 to data and return the result.
+ * [RFC4648]
+ */
+ return Buffer.from(input).toString('base64');
+}
+exports.forgivingBase64Encode = forgivingBase64Encode;
+/**
+ * Decodes a base-64 string.
+ *
+ * @param input - a string
+ */
+function forgivingBase64Decode(input) {
+ if (input === "")
+ return "";
+ /**
+ * 1. Remove all ASCII whitespace from data.
+ */
+ input = input.replace(CodePoints_1.ASCIIWhiteSpace, '');
+ /**
+ * 2. If data’s length divides by 4 leaving no remainder, then:
+ * 2.1. If data ends with one or two U+003D (=) code points, then remove them from data.
+ */
+ if (input.length % 4 === 0) {
+ if (input.endsWith("==")) {
+ input = input.substr(0, input.length - 2);
+ }
+ else if (input.endsWith("=")) {
+ input = input.substr(0, input.length - 1);
+ }
+ }
+ /**
+ * 3. If data’s length divides by 4 leaving a remainder of 1, then return failure.
+ */
+ if (input.length % 4 === 1)
+ return null;
+ /**
+ * 4. If data contains a code point that is not one of
+ * - U+002B (+)
+ * - U+002F (/)
+ * - ASCII alphanumeric
+ * then return failure.
+ */
+ if (!/[0-9A-Za-z+/]/.test(input))
+ return null;
+ /**
+ * 5. Let output be an empty byte sequence.
+ * 6. Let buffer be an empty buffer that can have bits appended to it.
+ * 7. Let position be a position variable for data, initially pointing at the
+ * start of data.
+ * 8. While position does not point past the end of data:
+ * 8.1. Find the code point pointed to by position in the second column of
+ * Table 1: The Base 64 Alphabet of RFC 4648. Let n be the number given in the
+ * first cell of the same row. [RFC4648]
+ * 8.2. Append the six bits corresponding to n, most significant bit first,
+ * to buffer.
+ * 8.3. If buffer has accumulated 24 bits, interpret them as three 8-bit
+ * big-endian numbers. Append three bytes with values equal to those numbers
+ * to output, in the same order, and then empty buffer.
+ * 8.4. Advance position by 1.
+ * 9. If buffer is not empty, it contains either 12 or 18 bits. If it contains
+ * 12 bits, then discard the last four and interpret the remaining eight as an
+ * 8-bit big-endian number. If it contains 18 bits, then discard the last two
+ * and interpret the remaining 16 as two 8-bit big-endian numbers. Append the
+ * one or two bytes with values equal to those one or two numbers to output,
+ * in the same order.
+ * 10. Return output.
+ */
+ return Buffer.from(input, 'base64').toString('utf8');
+}
+exports.forgivingBase64Decode = forgivingBase64Decode;
+//# sourceMappingURL=Base64.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/Base64.js.map b/node_modules/@oozcitak/infra/lib/Base64.js.map
new file mode 100644
index 0000000..c094257
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Base64.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Base64.js","sourceRoot":"","sources":["../src/Base64.ts"],"names":[],"mappings":";;AAAA,2CAA8C;AAE9C;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,KAAa;IACjD;;;;OAIG;IACH,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;AAC9C,CAAC;AAPD,sDAOC;AAED;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,KAAa;IACjD,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,EAAE,CAAA;IAC3B;;OAEG;IACH,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,4BAAe,EAAE,EAAE,CAAC,CAAA;IAC1C;;;OAGG;IACH,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;QAC1B,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAG;YACzB,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;SAC1C;aAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAG;YAC/B,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;SAC1C;KACF;IACD;;OAEG;IACH,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACvC;;;;;;OAMG;IACH,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IAC7C;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;AACtD,CAAC;AArDD,sDAqDC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/Byte.d.ts b/node_modules/@oozcitak/infra/lib/Byte.d.ts
new file mode 100644
index 0000000..9713abc
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Byte.d.ts
@@ -0,0 +1,6 @@
+/**
+ * Determines if the given number is an ASCII byte.
+ *
+ * @param byte - a byte
+ */
+export declare function isASCIIByte(byte: number): boolean;
diff --git a/node_modules/@oozcitak/infra/lib/Byte.js b/node_modules/@oozcitak/infra/lib/Byte.js
new file mode 100644
index 0000000..6f5167d
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Byte.js
@@ -0,0 +1,15 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Determines if the given number is an ASCII byte.
+ *
+ * @param byte - a byte
+ */
+function isASCIIByte(byte) {
+ /**
+ * An ASCII byte is a byte in the range 0x00 (NUL) to 0x7F (DEL), inclusive.
+ */
+ return byte >= 0x00 && byte <= 0x7F;
+}
+exports.isASCIIByte = isASCIIByte;
+//# sourceMappingURL=Byte.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/Byte.js.map b/node_modules/@oozcitak/infra/lib/Byte.js.map
new file mode 100644
index 0000000..e32eadd
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Byte.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Byte.js","sourceRoot":"","sources":["../src/Byte.ts"],"names":[],"mappings":";;AAAA;;;;GAIG;AACH,SAAgB,WAAW,CAAC,IAAY;IACtC;;OAEG;IACH,OAAO,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAA;AACrC,CAAC;AALD,kCAKC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/ByteSequence.d.ts b/node_modules/@oozcitak/infra/lib/ByteSequence.d.ts
new file mode 100644
index 0000000..cafcb28
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/ByteSequence.d.ts
@@ -0,0 +1,45 @@
+/**
+ * Returns the count of bytes in a sequence.
+ *
+ * @param list - a byte sequence
+ */
+export declare function length(list: Uint8Array): number;
+/**
+ * Converts each byte to lowercase.
+ *
+ * @param list - a byte sequence
+ */
+export declare function byteLowercase(list: Uint8Array): void;
+/**
+ * Converts each byte to uppercase.
+ *
+ * @param list - a byte sequence
+ */
+export declare function byteUppercase(list: Uint8Array): void;
+/**
+ * Compares two byte sequences.
+ *
+ * @param listA - a byte sequence
+ * @param listB - a byte sequence
+ */
+export declare function byteCaseInsensitiveMatch(listA: Uint8Array, listB: Uint8Array): boolean;
+/**
+ * Determines if `listA` starts with `listB`.
+ *
+ * @param listA - a byte sequence
+ * @param listB - a byte sequence
+ */
+export declare function startsWith(listA: Uint8Array, listB: Uint8Array): boolean;
+/**
+ * Determines if `listA` is less than `listB`.
+ *
+ * @param listA - a byte sequence
+ * @param listB - a byte sequence
+ */
+export declare function byteLessThan(listA: Uint8Array, listB: Uint8Array): boolean;
+/**
+ * Decodes a byte sequence into a string.
+ *
+ * @param list - a byte sequence
+ */
+export declare function isomorphicDecode(list: Uint8Array): string;
diff --git a/node_modules/@oozcitak/infra/lib/ByteSequence.js b/node_modules/@oozcitak/infra/lib/ByteSequence.js
new file mode 100644
index 0000000..37f1cce
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/ByteSequence.js
@@ -0,0 +1,171 @@
+"use strict";
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+var __spread = (this && this.__spread) || function () {
+ for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Returns the count of bytes in a sequence.
+ *
+ * @param list - a byte sequence
+ */
+function length(list) {
+ /**
+ * A byte sequence’s length is the number of bytes it contains.
+ */
+ return list.length;
+}
+exports.length = length;
+/**
+ * Converts each byte to lowercase.
+ *
+ * @param list - a byte sequence
+ */
+function byteLowercase(list) {
+ /**
+ * To byte-lowercase a byte sequence, increase each byte it contains, in the
+ * range 0x41 (A) to 0x5A (Z), inclusive, by 0x20.
+ */
+ for (var i = 0; i < list.length; i++) {
+ var c = list[i];
+ if (c >= 0x41 && c <= 0x5A) {
+ list[i] = c + 0x20;
+ }
+ }
+}
+exports.byteLowercase = byteLowercase;
+/**
+ * Converts each byte to uppercase.
+ *
+ * @param list - a byte sequence
+ */
+function byteUppercase(list) {
+ /**
+ * To byte-uppercase a byte sequence, subtract each byte it contains, in the
+ * range 0x61 (a) to 0x7A (z), inclusive, by 0x20.
+ */
+ for (var i = 0; i < list.length; i++) {
+ var c = list[i];
+ if (c >= 0x61 && c <= 0x7A) {
+ list[i] = c - 0x20;
+ }
+ }
+}
+exports.byteUppercase = byteUppercase;
+/**
+ * Compares two byte sequences.
+ *
+ * @param listA - a byte sequence
+ * @param listB - a byte sequence
+ */
+function byteCaseInsensitiveMatch(listA, listB) {
+ /**
+ * A byte sequence A is a byte-case-insensitive match for a byte sequence B,
+ * if the byte-lowercase of A is the byte-lowercase of B.
+ */
+ if (listA.length !== listB.length)
+ return false;
+ for (var i = 0; i < listA.length; i++) {
+ var a = listA[i];
+ var b = listB[i];
+ if (a >= 0x41 && a <= 0x5A)
+ a += 0x20;
+ if (b >= 0x41 && b <= 0x5A)
+ b += 0x20;
+ if (a !== b)
+ return false;
+ }
+ return true;
+}
+exports.byteCaseInsensitiveMatch = byteCaseInsensitiveMatch;
+/**
+ * Determines if `listA` starts with `listB`.
+ *
+ * @param listA - a byte sequence
+ * @param listB - a byte sequence
+ */
+function startsWith(listA, listB) {
+ /**
+ * 1. Let i be 0.
+ * 2. While true:
+ * 2.1. Let aByte be the ith byte of a if i is less than a’s length; otherwise null.
+ * 2.3. Let bByte be the ith byte of b if i is less than b’s length; otherwise null.
+ * 2.4. If bByte is null, then return true.
+ * 2.5. Return false if aByte is not bByte.
+ * 2.6. Set i to i + 1.
+ */
+ var i = 0;
+ while (true) {
+ if (i >= listA.length)
+ return false;
+ if (i >= listB.length)
+ return true;
+ if (listA[i] !== listB[i])
+ return false;
+ i++;
+ }
+}
+exports.startsWith = startsWith;
+/**
+ * Determines if `listA` is less than `listB`.
+ *
+ * @param listA - a byte sequence
+ * @param listB - a byte sequence
+ */
+function byteLessThan(listA, listB) {
+ /**
+ * 1. If b starts with a, then return false.
+ * 2. If a starts with b, then return true.
+ * 3. Let n be the smallest index such that the nth byte of a is different
+ * from the nth byte of b. (There has to be such an index, since neither byte
+ * sequence starts with the other.)
+ * 4. If the nth byte of a is less than the nth byte of b, then return true.
+ * 5. Return false.
+ */
+ var i = 0;
+ while (true) {
+ if (i >= listA.length)
+ return false;
+ if (i >= listB.length)
+ return true;
+ var a = listA[i];
+ var b = listB[i];
+ if (a < b)
+ return true;
+ else if (a > b)
+ return false;
+ i++;
+ }
+}
+exports.byteLessThan = byteLessThan;
+/**
+ * Decodes a byte sequence into a string.
+ *
+ * @param list - a byte sequence
+ */
+function isomorphicDecode(list) {
+ /**
+ * To isomorphic decode a byte sequence input, return a string whose length is
+ * equal to input’s length and whose code points have the same values as
+ * input’s bytes, in the same order.
+ */
+ return String.fromCodePoint.apply(String, __spread(list));
+}
+exports.isomorphicDecode = isomorphicDecode;
+//# sourceMappingURL=ByteSequence.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/ByteSequence.js.map b/node_modules/@oozcitak/infra/lib/ByteSequence.js.map
new file mode 100644
index 0000000..6380a27
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/ByteSequence.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ByteSequence.js","sourceRoot":"","sources":["../src/ByteSequence.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,SAAgB,MAAM,CAAC,IAAgB;IACrC;;OAEG;IACH,OAAO,IAAI,CAAC,MAAM,CAAA;AACpB,CAAC;AALD,wBAKC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,IAAgB;IAC5C;;;OAGG;IACH,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACpC,IAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;QACjB,IAAI,CAAC,IAAI,I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,GAAG,CAAC,CAAA;IACT,OAAO,IAAI,EAAE;QACX,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM;YAAE,OAAO,KAAK,CAAA;QACnC,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM;YAAE,OAAO,IAAI,CAAA;QAClC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAA;QACvC,CAAC,EAAE,CAAA;KACJ;AACH,CAAC;AAjBD,gCAiBC;AAED;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,KAAiB,EAAE,KAAiB;IAC/D;;;;;;;;OAQG;IACH,IAAI,CAAC,GAAG,CAAC,CAAA;IACT,OAAO,IAAI,EAAE;QACX,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM;YAAE,OAAO,KAAK,CAAA;QACnC,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM;YAAE,OAAO,IAAI,CAAA;QAClC,IAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;QAClB,IAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;QAClB,IAAI,CAAC,GAAG,CAAC;YACP,OAAO,IAAI,CAAA;aACR,IAAI,CAAC,GAAG,CAAC;YACZ,OAAO,KAAK,CAAA;QACd,CAAC,EAAE,CAAA;KACJ;AACH,CAAC;AAtBD,oCAsBC;AAED;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,IAAgB;IAC/C;;;;OAIG;IACH,OAAO,MAAM,CAAC,aAAa,OAApB,MAAM,WAAkB,IAAI,GAAC;AACtC,CAAC;AAPD,4CAOC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/CodePoints.d.ts b/node_modules/@oozcitak/infra/lib/CodePoints.d.ts
new file mode 100644
index 0000000..3c83b6f
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/CodePoints.d.ts
@@ -0,0 +1,82 @@
+/**
+ * A surrogate is a code point that is in the range U+D800 to U+DFFF, inclusive.
+ */
+export declare const Surrogate: RegExp;
+/**
+ * A scalar value is a code point that is not a surrogate.
+ */
+export declare const ScalarValue: RegExp;
+/**
+ * A noncharacter is a code point that is in the range U+FDD0 to U+FDEF,
+ * inclusive, or U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, U+2FFFE, U+2FFFF, U+3FFFE,
+ * U+3FFFF, U+4FFFE, U+4FFFF, U+5FFFE, U+5FFFF, U+6FFFE, U+6FFFF, U+7FFFE,
+ * U+7FFFF, U+8FFFE, U+8FFFF, U+9FFFE, U+9FFFF, U+AFFFE, U+AFFFF, U+BFFFE,
+ * U+BFFFF, U+CFFFE, U+CFFFF, U+DFFFE, U+DFFFF, U+EFFFE, U+EFFFF, U+FFFFE,
+ * U+FFFFF, U+10FFFE, or U+10FFFF.
+ */
+export declare const NonCharacter: RegExp;
+/**
+ * An ASCII code point is a code point in the range U+0000 NULL to U+007F
+ * DELETE, inclusive.
+ */
+export declare const ASCIICodePoint: RegExp;
+/**
+ * An ASCII tab or newline is U+0009 TAB, U+000A LF, or U+000D CR.
+ */
+export declare const ASCIITabOrNewLine: RegExp;
+/**
+ * ASCII whitespace is U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or
+ * U+0020 SPACE.
+ */
+export declare const ASCIIWhiteSpace: RegExp;
+/**
+ * A C0 control is a code point in the range U+0000 NULL to U+001F
+ * INFORMATION SEPARATOR ONE, inclusive.
+ */
+export declare const C0Control: RegExp;
+/**
+ * A C0 control or space is a C0 control or U+0020 SPACE.
+ */
+export declare const C0ControlOrSpace: RegExp;
+/**
+ * A control is a C0 control or a code point in the range U+007F DELETE to
+ * U+009F APPLICATION PROGRAM COMMAND, inclusive.
+ */
+export declare const Control: RegExp;
+/**
+ * An ASCII digit is a code point in the range U+0030 (0) to U+0039 (9),
+ * inclusive.
+ */
+export declare const ASCIIDigit: RegExp;
+/**
+ * An ASCII upper hex digit is an ASCII digit or a code point in the range
+ * U+0041 (A) to U+0046 (F), inclusive.
+ */
+export declare const ASCIIUpperHexDigit: RegExp;
+/**
+ * An ASCII lower hex digit is an ASCII digit or a code point in the range
+ * U+0061 (a) to U+0066 (f), inclusive.
+ */
+export declare const ASCIILowerHexDigit: RegExp;
+/**
+ * An ASCII hex digit is an ASCII upper hex digit or ASCII lower hex digit.
+ */
+export declare const ASCIIHexDigit: RegExp;
+/**
+ * An ASCII upper alpha is a code point in the range U+0041 (A) to U+005A (Z),
+ * inclusive.
+ */
+export declare const ASCIIUpperAlpha: RegExp;
+/**
+ * An ASCII lower alpha is a code point in the range U+0061 (a) to U+007A (z),
+ * inclusive.
+ */
+export declare const ASCIILowerAlpha: RegExp;
+/**
+ * An ASCII alpha is an ASCII upper alpha or ASCII lower alpha.
+ */
+export declare const ASCIIAlpha: RegExp;
+/**
+ * An ASCII alphanumeric is an ASCII digit or ASCII alpha.
+ */
+export declare const ASCIIAlphanumeric: RegExp;
diff --git a/node_modules/@oozcitak/infra/lib/CodePoints.js b/node_modules/@oozcitak/infra/lib/CodePoints.js
new file mode 100644
index 0000000..1e0c921
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/CodePoints.js
@@ -0,0 +1,85 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * A surrogate is a code point that is in the range U+D800 to U+DFFF, inclusive.
+ */
+exports.Surrogate = /[\uD800-\uDFFF]/;
+/**
+ * A scalar value is a code point that is not a surrogate.
+ */
+exports.ScalarValue = /[\uD800-\uDFFF]/;
+/**
+ * A noncharacter is a code point that is in the range U+FDD0 to U+FDEF,
+ * inclusive, or U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, U+2FFFE, U+2FFFF, U+3FFFE,
+ * U+3FFFF, U+4FFFE, U+4FFFF, U+5FFFE, U+5FFFF, U+6FFFE, U+6FFFF, U+7FFFE,
+ * U+7FFFF, U+8FFFE, U+8FFFF, U+9FFFE, U+9FFFF, U+AFFFE, U+AFFFF, U+BFFFE,
+ * U+BFFFF, U+CFFFE, U+CFFFF, U+DFFFE, U+DFFFF, U+EFFFE, U+EFFFF, U+FFFFE,
+ * U+FFFFF, U+10FFFE, or U+10FFFF.
+ */
+exports.NonCharacter = /[\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]/;
+/**
+ * An ASCII code point is a code point in the range U+0000 NULL to U+007F
+ * DELETE, inclusive.
+ */
+exports.ASCIICodePoint = /[\u0000-\u007F]/;
+/**
+ * An ASCII tab or newline is U+0009 TAB, U+000A LF, or U+000D CR.
+ */
+exports.ASCIITabOrNewLine = /[\t\n\r]/;
+/**
+ * ASCII whitespace is U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or
+ * U+0020 SPACE.
+ */
+exports.ASCIIWhiteSpace = /[\t\n\f\r ]/;
+/**
+ * A C0 control is a code point in the range U+0000 NULL to U+001F
+ * INFORMATION SEPARATOR ONE, inclusive.
+ */
+exports.C0Control = /[\u0000-\u001F]/;
+/**
+ * A C0 control or space is a C0 control or U+0020 SPACE.
+ */
+exports.C0ControlOrSpace = /[\u0000-\u001F ]/;
+/**
+ * A control is a C0 control or a code point in the range U+007F DELETE to
+ * U+009F APPLICATION PROGRAM COMMAND, inclusive.
+ */
+exports.Control = /[\u0000-\u001F\u007F-\u009F]/;
+/**
+ * An ASCII digit is a code point in the range U+0030 (0) to U+0039 (9),
+ * inclusive.
+ */
+exports.ASCIIDigit = /[0-9]/;
+/**
+ * An ASCII upper hex digit is an ASCII digit or a code point in the range
+ * U+0041 (A) to U+0046 (F), inclusive.
+ */
+exports.ASCIIUpperHexDigit = /[0-9A-F]/;
+/**
+ * An ASCII lower hex digit is an ASCII digit or a code point in the range
+ * U+0061 (a) to U+0066 (f), inclusive.
+ */
+exports.ASCIILowerHexDigit = /[0-9a-f]/;
+/**
+ * An ASCII hex digit is an ASCII upper hex digit or ASCII lower hex digit.
+ */
+exports.ASCIIHexDigit = /[0-9A-Fa-f]/;
+/**
+ * An ASCII upper alpha is a code point in the range U+0041 (A) to U+005A (Z),
+ * inclusive.
+ */
+exports.ASCIIUpperAlpha = /[A-Z]/;
+/**
+ * An ASCII lower alpha is a code point in the range U+0061 (a) to U+007A (z),
+ * inclusive.
+ */
+exports.ASCIILowerAlpha = /[a-z]/;
+/**
+ * An ASCII alpha is an ASCII upper alpha or ASCII lower alpha.
+ */
+exports.ASCIIAlpha = /[A-Za-z]/;
+/**
+ * An ASCII alphanumeric is an ASCII digit or ASCII alpha.
+ */
+exports.ASCIIAlphanumeric = /[0-9A-Za-z]/;
+//# sourceMappingURL=CodePoints.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/CodePoints.js.map b/node_modules/@oozcitak/infra/lib/CodePoints.js.map
new file mode 100644
index 0000000..67e7b09
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/CodePoints.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"CodePoints.js","sourceRoot":"","sources":["../src/CodePoints.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACU,QAAA,SAAS,GAAG,iBAAiB,CAAA;AAC1C;;GAEG;AACU,QAAA,WAAW,GAAG,iBAAiB,CAAA;AAE5C;;;;;;;GAOG;AACU,QAAA,YAAY,GAAG,8IAA8I,CAAA;AAC1K;;;GAGG;AACU,QAAA,cAAc,GAAG,iBAAiB,CAAA;AAC/C;;GAEG;AACU,QAAA,iBAAiB,GAAG,UAAU,CAAA;AAC3C;;;GAGG;AACU,QAAA,eAAe,GAAG,aAAa,CAAA;AAC5C;;;GAGG;AACU,QAAA,SAAS,GAAG,iBAAiB,CAAA;AAC1C;;GAEG;AACU,QAAA,gBAAgB,GAAG,kBAAkB,CAAA;AAClD;;;GAGG;AACU,QAAA,OAAO,GAAG,8BAA8B,CAAA;AACrD;;;GAGG;AACU,QAAA,UAAU,GAAG,OAAO,CAAA;AACjC;;;GAGG;AACU,QAAA,kBAAkB,GAAG,UAAU,CAAA;AAC5C;;;GAGG;AACU,QAAA,kBAAkB,GAAG,UAAU,CAAA;AAC5C;;GAEG;AACU,QAAA,aAAa,GAAG,aAAa,CAAA;AAC1C;;;GAGG;AACU,QAAA,eAAe,GAAG,OAAO,CAAA;AACtC;;;GAGG;AACU,QAAA,eAAe,GAAG,OAAO,CAAA;AACtC;;GAEG;AACU,QAAA,UAAU,GAAG,UAAU,CAAA;AACpC;;GAEG;AACU,QAAA,iBAAiB,GAAG,aAAa,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/JSON.d.ts b/node_modules/@oozcitak/infra/lib/JSON.d.ts
new file mode 100644
index 0000000..ab3820d
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/JSON.d.ts
@@ -0,0 +1,24 @@
+/**
+ * Parses the given byte sequence representing a JSON string into an object.
+ *
+ * @param bytes - a byte sequence
+ */
+export declare function parseJSONFromBytes(bytes: Uint8Array): any;
+/**
+ * Serialize the given JavaScript value into a byte sequence.
+ *
+ * @param value - a JavaScript value
+ */
+export declare function serializeJSONToBytes(value: any): Uint8Array;
+/**
+ * Parses the given JSON string into a Realm-independent JavaScript value.
+ *
+ * @param jsonText - a JSON string
+ */
+export declare function parseJSONIntoInfraValues(jsonText: string): any;
+/**
+ * Parses the value into a Realm-independent JavaScript value.
+ *
+ * @param jsValue - a JavaScript value
+ */
+export declare function convertAJSONDerivedJavaScriptValueToAnInfraValue(jsValue: any): any;
diff --git a/node_modules/@oozcitak/infra/lib/JSON.js b/node_modules/@oozcitak/infra/lib/JSON.js
new file mode 100644
index 0000000..f5ffe5c
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/JSON.js
@@ -0,0 +1,123 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("@oozcitak/util");
+/**
+ * Parses the given byte sequence representing a JSON string into an object.
+ *
+ * @param bytes - a byte sequence
+ */
+function parseJSONFromBytes(bytes) {
+ /**
+ * 1. Let jsonText be the result of running UTF-8 decode on bytes. [ENCODING]
+ * 2. Return ? Call(%JSONParse%, undefined, « jsonText »).
+ */
+ var jsonText = util_1.utf8Decode(bytes);
+ return JSON.parse.call(undefined, jsonText);
+}
+exports.parseJSONFromBytes = parseJSONFromBytes;
+/**
+ * Serialize the given JavaScript value into a byte sequence.
+ *
+ * @param value - a JavaScript value
+ */
+function serializeJSONToBytes(value) {
+ /**
+ * 1. Let jsonString be ? Call(%JSONStringify%, undefined, « value »).
+ * 2. Return the result of running UTF-8 encode on jsonString. [ENCODING]
+ */
+ var jsonString = JSON.stringify.call(undefined, value);
+ return util_1.utf8Encode(jsonString);
+}
+exports.serializeJSONToBytes = serializeJSONToBytes;
+/**
+ * Parses the given JSON string into a Realm-independent JavaScript value.
+ *
+ * @param jsonText - a JSON string
+ */
+function parseJSONIntoInfraValues(jsonText) {
+ /**
+ * 1. Let jsValue be ? Call(%JSONParse%, undefined, « jsonText »).
+ * 2. Return the result of converting a JSON-derived JavaScript value to an
+ * Infra value, given jsValue.
+ */
+ var jsValue = JSON.parse.call(undefined, jsonText);
+ return convertAJSONDerivedJavaScriptValueToAnInfraValue(jsValue);
+}
+exports.parseJSONIntoInfraValues = parseJSONIntoInfraValues;
+/**
+ * Parses the value into a Realm-independent JavaScript value.
+ *
+ * @param jsValue - a JavaScript value
+ */
+function convertAJSONDerivedJavaScriptValueToAnInfraValue(jsValue) {
+ var e_1, _a;
+ /**
+ * 1. If Type(jsValue) is Null, String, or Number, then return jsValue.
+ */
+ if (jsValue === null || util_1.isString(jsValue) || util_1.isNumber(jsValue))
+ return jsValue;
+ /**
+ * 2. If IsArray(jsValue) is true, then:
+ * 2.1. Let result be an empty list.
+ * 2.2. Let length be ! ToLength(! Get(jsValue, "length")).
+ * 2.3. For each index of the range 0 to length − 1, inclusive:
+ * 2.3.1. Let indexName be ! ToString(index).
+ * 2.3.2. Let jsValueAtIndex be ! Get(jsValue, indexName).
+ * 2.3.3. Let infraValueAtIndex be the result of converting a JSON-derived
+ * JavaScript value to an Infra value, given jsValueAtIndex.
+ * 2.3.4. Append infraValueAtIndex to result.
+ * 2.8. Return result.
+ */
+ if (util_1.isArray(jsValue)) {
+ var result = new Array();
+ try {
+ for (var jsValue_1 = __values(jsValue), jsValue_1_1 = jsValue_1.next(); !jsValue_1_1.done; jsValue_1_1 = jsValue_1.next()) {
+ var jsValueAtIndex = jsValue_1_1.value;
+ result.push(convertAJSONDerivedJavaScriptValueToAnInfraValue(jsValueAtIndex));
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (jsValue_1_1 && !jsValue_1_1.done && (_a = jsValue_1.return)) _a.call(jsValue_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ return result;
+ }
+ else if (util_1.isObject(jsValue)) {
+ /**
+ * 3. Let result be an empty ordered map.
+ * 4. For each key of ! jsValue.[[OwnPropertyKeys]]():
+ * 4.1. Let jsValueAtKey be ! Get(jsValue, key).
+ * 4.2. Let infraValueAtKey be the result of converting a JSON-derived
+ * JavaScript value to an Infra value, given jsValueAtKey.
+ * 4.3. Set result[key] to infraValueAtKey.
+ * 5. Return result.
+ */
+ var result = new Map();
+ for (var key in jsValue) {
+ /* istanbul ignore else */
+ if (jsValue.hasOwnProperty(key)) {
+ var jsValueAtKey = jsValue[key];
+ result.set(key, convertAJSONDerivedJavaScriptValueToAnInfraValue(jsValueAtKey));
+ }
+ }
+ return result;
+ }
+ /* istanbul ignore next */
+ return jsValue;
+}
+exports.convertAJSONDerivedJavaScriptValueToAnInfraValue = convertAJSONDerivedJavaScriptValueToAnInfraValue;
+//# sourceMappingURL=JSON.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/JSON.js.map b/node_modules/@oozcitak/infra/lib/JSON.js.map
new file mode 100644
index 0000000..7af86b5
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/JSON.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"JSON.js","sourceRoot":"","sources":["../src/JSON.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,uCAEuB;AAEvB;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,KAAiB;IAClD;;;OAGG;IACH,IAAM,QAAQ,GAAG,iBAAU,CAAC,KAAK,CAAC,CAAA;IAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;AAC7C,CAAC;AAPD,gDAOC;AAED;;;;GAIG;AACH,SAAgB,oBAAoB,CAAC,KAAU;IAC7C;;;OAGG;IACH,IAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;IACxD,OAAO,iBAAU,CAAC,UAAU,CAAC,CAAA;AAC/B,CAAC;AAPD,oDAOC;AAED;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,QAAgB;IACvD;;;;OAIG;IACH,IAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;IACpD,OAAO,gDAAgD,CAAC,OAAO,CAAC,CAAA;AAClE,CAAC;AARD,4DAQC;AAED;;;;GAIG;AACH,SAAgB,gDAAgD,CAAC,OAAY;;IAC3E;;OAEG;IACH,IAAI,OAAO,KAAK,IAAI,IAAI,eAAQ,CAAC,OAAO,CAAC,IAAI,eAAQ,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAA;IAE9E;;;;;;;;;;;OAWG;IACH,IAAI,cAAO,CAAC,OAAO,CAAC,EAAE;QACpB,IAAM,MAAM,GAAG,IAAI,KAAK,EAAO,CAAA;;YAC/B,KAA6B,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;gBAAjC,IAAM,cAAc,oBAAA;gBACvB,MAAM,CAAC,IAAI,CAAC,gDAAgD,CAAC,cAAc,CAAC,CAAC,CAAA;aAC9E;;;;;;;;;QACD,OAAO,MAAM,CAAA;KACd;SAAM,IAAI,eAAQ,CAAC,OAAO,CAAC,EAAE;QAC5B;;;;;;;;WAQG;QACH,IAAM,MAAM,GAAG,IAAI,GAAG,EAAe,CAAA;QACrC,KAAK,IAAM,GAAG,IAAI,OAAO,EAAE;YACzB,0BAA0B;YAC1B,IAAI,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;gBAC/B,IAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;gBACjC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,gDAAgD,CAAC,YAAY,CAAC,CAAC,CAAA;aAChF;SACF;QACD,OAAO,MAAM,CAAA;KACd;IAED,0BAA0B;IAC1B,OAAO,OAAO,CAAA;AAChB,CAAC;AA/CD,4GA+CC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/List.d.ts b/node_modules/@oozcitak/infra/lib/List.d.ts
new file mode 100644
index 0000000..041335b
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/List.d.ts
@@ -0,0 +1,101 @@
+/**
+ * Adds the given item to the end of the list.
+ *
+ * @param list - a list
+ * @param item - an item
+ */
+export declare function append(list: Array, item: T): void;
+/**
+ * Extends a list by appending all items from another list.
+ *
+ * @param listA - a list to extend
+ * @param listB - a list containing items to append to `listA`
+ */
+export declare function extend(listA: Array, listB: Array): void;
+/**
+ * Inserts the given item to the start of the list.
+ *
+ * @param list - a list
+ * @param item - an item
+ */
+export declare function prepend(list: Array, item: T): void;
+/**
+ * Replaces the given item or all items matching condition with a new item.
+ *
+ * @param list - a list
+ * @param conditionOrItem - an item to replace or a condition matching items
+ * to replace
+ * @param item - an item
+ */
+export declare function replace(list: Array, conditionOrItem: T | ((item: T) => boolean), newItem: T): void;
+/**
+ * Inserts the given item before the given index.
+ *
+ * @param list - a list
+ * @param item - an item
+ */
+export declare function insert(list: Array, item: T, index: number): void;
+/**
+ * Removes the given item or all items matching condition.
+ *
+ * @param list - a list
+ * @param conditionOrItem - an item to remove or a condition matching items
+ * to remove
+ */
+export declare function remove(list: Array, conditionOrItem: T | ((item: T) => boolean)): void;
+/**
+ * Removes all items from the list.
+ */
+export declare function empty(list: Array): void;
+/**
+ * Determines if the list contains the given item or any items matching
+ * condition.
+ *
+ * @param list - a list
+ * @param conditionOrItem - an item to a condition to match
+ */
+export declare function contains(list: Array, conditionOrItem: T | ((item: T) => boolean)): boolean;
+/**
+ * Returns the count of items in the list matching the given condition.
+ *
+ * @param list - a list
+ * @param condition - an optional condition to match
+ */
+export declare function size(list: Array, condition?: ((item: T) => boolean)): number;
+/**
+ * Determines if the list is empty.
+ *
+ * @param list - a list
+ */
+export declare function isEmpty(list: Array): boolean;
+/**
+ * Returns an iterator for the items of the list.
+ *
+ * @param list - a list
+ * @param condition - an optional condition to match
+ */
+export declare function forEach(list: Array, condition?: ((item: T) => any)): IterableIterator;
+/**
+ * Creates and returns a shallow clone of list.
+ *
+ * @param list - a list
+ */
+export declare function clone(list: Array): Array;
+/**
+ * Returns a new list containing items from the list sorted in ascending
+ * order.
+ *
+ * @param list - a list
+ * @param lessThanAlgo - a function that returns `true` if its first argument
+ * is less than its second argument, and `false` otherwise.
+ */
+export declare function sortInAscendingOrder(list: Array, lessThanAlgo: ((itemA: T, itemB: T) => boolean)): Array;
+/**
+ * Returns a new list containing items from the list sorted in descending
+ * order.
+ *
+ * @param list - a list
+ * @param lessThanAlgo - a function that returns `true` if its first argument
+ * is less than its second argument, and `false` otherwise.
+ */
+export declare function sortInDescendingOrder(list: Array, lessThanAlgo: ((itemA: T, itemB: T) => boolean)): Array;
diff --git a/node_modules/@oozcitak/infra/lib/List.js b/node_modules/@oozcitak/infra/lib/List.js
new file mode 100644
index 0000000..069152a
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/List.js
@@ -0,0 +1,325 @@
+"use strict";
+var __generator = (this && this.__generator) || function (thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (_) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+};
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+var __spread = (this && this.__spread) || function () {
+ for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
+ return ar;
+};
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("@oozcitak/util");
+/**
+ * Adds the given item to the end of the list.
+ *
+ * @param list - a list
+ * @param item - an item
+ */
+function append(list, item) {
+ list.push(item);
+}
+exports.append = append;
+/**
+ * Extends a list by appending all items from another list.
+ *
+ * @param listA - a list to extend
+ * @param listB - a list containing items to append to `listA`
+ */
+function extend(listA, listB) {
+ listA.push.apply(listA, __spread(listB));
+}
+exports.extend = extend;
+/**
+ * Inserts the given item to the start of the list.
+ *
+ * @param list - a list
+ * @param item - an item
+ */
+function prepend(list, item) {
+ list.unshift(item);
+}
+exports.prepend = prepend;
+/**
+ * Replaces the given item or all items matching condition with a new item.
+ *
+ * @param list - a list
+ * @param conditionOrItem - an item to replace or a condition matching items
+ * to replace
+ * @param item - an item
+ */
+function replace(list, conditionOrItem, newItem) {
+ var e_1, _a;
+ var i = 0;
+ try {
+ for (var list_1 = __values(list), list_1_1 = list_1.next(); !list_1_1.done; list_1_1 = list_1.next()) {
+ var oldItem = list_1_1.value;
+ if (util_1.isFunction(conditionOrItem)) {
+ if (!!conditionOrItem.call(null, oldItem)) {
+ list[i] = newItem;
+ }
+ }
+ else if (oldItem === conditionOrItem) {
+ list[i] = newItem;
+ return;
+ }
+ i++;
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (list_1_1 && !list_1_1.done && (_a = list_1.return)) _a.call(list_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+}
+exports.replace = replace;
+/**
+ * Inserts the given item before the given index.
+ *
+ * @param list - a list
+ * @param item - an item
+ */
+function insert(list, item, index) {
+ list.splice(index, 0, item);
+}
+exports.insert = insert;
+/**
+ * Removes the given item or all items matching condition.
+ *
+ * @param list - a list
+ * @param conditionOrItem - an item to remove or a condition matching items
+ * to remove
+ */
+function remove(list, conditionOrItem) {
+ var i = list.length;
+ while (i--) {
+ var oldItem = list[i];
+ if (util_1.isFunction(conditionOrItem)) {
+ if (!!conditionOrItem.call(null, oldItem)) {
+ list.splice(i, 1);
+ }
+ }
+ else if (oldItem === conditionOrItem) {
+ list.splice(i, 1);
+ return;
+ }
+ }
+}
+exports.remove = remove;
+/**
+ * Removes all items from the list.
+ */
+function empty(list) {
+ list.length = 0;
+}
+exports.empty = empty;
+/**
+ * Determines if the list contains the given item or any items matching
+ * condition.
+ *
+ * @param list - a list
+ * @param conditionOrItem - an item to a condition to match
+ */
+function contains(list, conditionOrItem) {
+ var e_2, _a;
+ try {
+ for (var list_2 = __values(list), list_2_1 = list_2.next(); !list_2_1.done; list_2_1 = list_2.next()) {
+ var oldItem = list_2_1.value;
+ if (util_1.isFunction(conditionOrItem)) {
+ if (!!conditionOrItem.call(null, oldItem)) {
+ return true;
+ }
+ }
+ else if (oldItem === conditionOrItem) {
+ return true;
+ }
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (list_2_1 && !list_2_1.done && (_a = list_2.return)) _a.call(list_2);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ return false;
+}
+exports.contains = contains;
+/**
+ * Returns the count of items in the list matching the given condition.
+ *
+ * @param list - a list
+ * @param condition - an optional condition to match
+ */
+function size(list, condition) {
+ var e_3, _a;
+ if (condition === undefined) {
+ return list.length;
+ }
+ else {
+ var count = 0;
+ try {
+ for (var list_3 = __values(list), list_3_1 = list_3.next(); !list_3_1.done; list_3_1 = list_3.next()) {
+ var item = list_3_1.value;
+ if (!!condition.call(null, item)) {
+ count++;
+ }
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (list_3_1 && !list_3_1.done && (_a = list_3.return)) _a.call(list_3);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ return count;
+ }
+}
+exports.size = size;
+/**
+ * Determines if the list is empty.
+ *
+ * @param list - a list
+ */
+function isEmpty(list) {
+ return list.length === 0;
+}
+exports.isEmpty = isEmpty;
+/**
+ * Returns an iterator for the items of the list.
+ *
+ * @param list - a list
+ * @param condition - an optional condition to match
+ */
+function forEach(list, condition) {
+ var list_4, list_4_1, item, e_4_1;
+ var e_4, _a;
+ return __generator(this, function (_b) {
+ switch (_b.label) {
+ case 0:
+ if (!(condition === undefined)) return [3 /*break*/, 2];
+ return [5 /*yield**/, __values(list)];
+ case 1:
+ _b.sent();
+ return [3 /*break*/, 9];
+ case 2:
+ _b.trys.push([2, 7, 8, 9]);
+ list_4 = __values(list), list_4_1 = list_4.next();
+ _b.label = 3;
+ case 3:
+ if (!!list_4_1.done) return [3 /*break*/, 6];
+ item = list_4_1.value;
+ if (!!!condition.call(null, item)) return [3 /*break*/, 5];
+ return [4 /*yield*/, item];
+ case 4:
+ _b.sent();
+ _b.label = 5;
+ case 5:
+ list_4_1 = list_4.next();
+ return [3 /*break*/, 3];
+ case 6: return [3 /*break*/, 9];
+ case 7:
+ e_4_1 = _b.sent();
+ e_4 = { error: e_4_1 };
+ return [3 /*break*/, 9];
+ case 8:
+ try {
+ if (list_4_1 && !list_4_1.done && (_a = list_4.return)) _a.call(list_4);
+ }
+ finally { if (e_4) throw e_4.error; }
+ return [7 /*endfinally*/];
+ case 9: return [2 /*return*/];
+ }
+ });
+}
+exports.forEach = forEach;
+/**
+ * Creates and returns a shallow clone of list.
+ *
+ * @param list - a list
+ */
+function clone(list) {
+ return new (Array.bind.apply(Array, __spread([void 0], list)))();
+}
+exports.clone = clone;
+/**
+ * Returns a new list containing items from the list sorted in ascending
+ * order.
+ *
+ * @param list - a list
+ * @param lessThanAlgo - a function that returns `true` if its first argument
+ * is less than its second argument, and `false` otherwise.
+ */
+function sortInAscendingOrder(list, lessThanAlgo) {
+ return list.sort(function (itemA, itemB) {
+ return lessThanAlgo.call(null, itemA, itemB) ? -1 : 1;
+ });
+}
+exports.sortInAscendingOrder = sortInAscendingOrder;
+/**
+ * Returns a new list containing items from the list sorted in descending
+ * order.
+ *
+ * @param list - a list
+ * @param lessThanAlgo - a function that returns `true` if its first argument
+ * is less than its second argument, and `false` otherwise.
+ */
+function sortInDescendingOrder(list, lessThanAlgo) {
+ return list.sort(function (itemA, itemB) {
+ return lessThanAlgo.call(null, itemA, itemB) ? 1 : -1;
+ });
+}
+exports.sortInDescendingOrder = sortInDescendingOrder;
+//# sourceMappingURL=List.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/List.js.map b/node_modules/@oozcitak/infra/lib/List.js.map
new file mode 100644
index 0000000..68fa374
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/List.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"List.js","sourceRoot":"","sources":["../src/List.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA2C;AAE3C;;;;;GAKG;AACH,SAAgB,MAAM,CAAI,IAAc,EAAE,IAAO;IAC/C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACjB,CAAC;AAFD,wBAEC;AAED;;;;;GAKG;AACH,SAAgB,MAAM,CAAI,KAAe,EAAE,KAAe;IACxD,KAAK,CAAC,IAAI,OAAV,KAAK,WAAS,KAAK,GAAC;AACtB,CAAC;AAFD,wBAEC;AAED;;;;;GAKG;AACH,SAAgB,OAAO,CAAI,IAAc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/node_modules/@oozcitak/infra/lib/Map.d.ts
@@ -0,0 +1,87 @@
+/**
+ * Gets the value corresponding to the given key.
+ *
+ * @param map - a map
+ * @param key - a key
+ */
+export declare function get(map: Map, key: K): V | undefined;
+/**
+ * Sets the value corresponding to the given key.
+ *
+ * @param map - a map
+ * @param key - a key
+ * @param val - a value
+ */
+export declare function set(map: Map, key: K, val: V): void;
+/**
+ * Removes the item with the given key or all items matching condition.
+ *
+ * @param map - a map
+ * @param conditionOrItem - the key of an item to remove or a condition matching
+ * items to remove
+ */
+export declare function remove(map: Map, conditionOrItem: K | ((item: [K, V]) => boolean)): void;
+/**
+ * Determines if the map contains a value with the given key.
+ *
+ * @param map - a map
+ * @param conditionOrItem - the key of an item to match or a condition matching
+ * items
+ */
+export declare function contains(map: Map, conditionOrItem: K | ((item: [K, V]) => boolean)): boolean;
+/**
+ * Gets the keys of the map.
+ *
+ * @param map - a map
+ */
+export declare function keys(map: Map): Set;
+/**
+ * Gets the values of the map.
+ *
+ * @param map - a map
+ */
+export declare function values(map: Map): V[];
+/**
+ * Gets the size of the map.
+ *
+ * @param map - a map
+ * @param condition - an optional condition to match
+ */
+export declare function size(map: Map, condition?: ((item: [K, V]) => boolean)): number;
+/**
+ * Determines if the map is empty.
+ *
+ * @param map - a map
+ */
+export declare function isEmpty(map: Map): boolean;
+/**
+ * Returns an iterator for the items of the map.
+ *
+ * @param map - a map
+ * @param condition - an optional condition to match
+ */
+export declare function forEach(map: Map, condition?: ((item: [K, V]) => boolean)): IterableIterator<[K, V]>;
+/**
+ * Creates and returns a shallow clone of map.
+ *
+ * @param map - a map
+ */
+export declare function clone(map: Map): Map;
+/**
+ * Returns a new map containing items from the map sorted in ascending
+ * order.
+ *
+ * @param map - a map
+ * @param lessThanAlgo - a function that returns `true` if its first argument
+ * is less than its second argument, and `false` otherwise.
+ */
+export declare function sortInAscendingOrder(map: Map, lessThanAlgo: ((itemA: [K, V], itemB: [K, V]) => boolean)): Map;
+/**
+ * Returns a new map containing items from the map sorted in descending
+ * order.
+ *
+ * @param map - a map
+ * @param lessThanAlgo - a function that returns `true` if its first argument
+ * is less than its second argument, and `false` otherwise.
+ */
+export declare function sortInDescendingOrder(map: Map, lessThanAlgo: ((itemA: [K, V], itemB: [K, V]) => boolean)): Map;
diff --git a/node_modules/@oozcitak/infra/lib/Map.js b/node_modules/@oozcitak/infra/lib/Map.js
new file mode 100644
index 0000000..93be48c
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Map.js
@@ -0,0 +1,308 @@
+"use strict";
+var __generator = (this && this.__generator) || function (thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (_) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+};
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+var __spread = (this && this.__spread) || function () {
+ for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("@oozcitak/util");
+/**
+ * Gets the value corresponding to the given key.
+ *
+ * @param map - a map
+ * @param key - a key
+ */
+function get(map, key) {
+ return map.get(key);
+}
+exports.get = get;
+/**
+ * Sets the value corresponding to the given key.
+ *
+ * @param map - a map
+ * @param key - a key
+ * @param val - a value
+ */
+function set(map, key, val) {
+ map.set(key, val);
+}
+exports.set = set;
+/**
+ * Removes the item with the given key or all items matching condition.
+ *
+ * @param map - a map
+ * @param conditionOrItem - the key of an item to remove or a condition matching
+ * items to remove
+ */
+function remove(map, conditionOrItem) {
+ var e_1, _a, e_2, _b;
+ if (!util_1.isFunction(conditionOrItem)) {
+ map.delete(conditionOrItem);
+ }
+ else {
+ var toRemove = [];
+ try {
+ for (var map_1 = __values(map), map_1_1 = map_1.next(); !map_1_1.done; map_1_1 = map_1.next()) {
+ var item = map_1_1.value;
+ if (!!conditionOrItem.call(null, item)) {
+ toRemove.push(item[0]);
+ }
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (map_1_1 && !map_1_1.done && (_a = map_1.return)) _a.call(map_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ try {
+ for (var toRemove_1 = __values(toRemove), toRemove_1_1 = toRemove_1.next(); !toRemove_1_1.done; toRemove_1_1 = toRemove_1.next()) {
+ var key = toRemove_1_1.value;
+ map.delete(key);
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (toRemove_1_1 && !toRemove_1_1.done && (_b = toRemove_1.return)) _b.call(toRemove_1);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ }
+}
+exports.remove = remove;
+/**
+ * Determines if the map contains a value with the given key.
+ *
+ * @param map - a map
+ * @param conditionOrItem - the key of an item to match or a condition matching
+ * items
+ */
+function contains(map, conditionOrItem) {
+ var e_3, _a;
+ if (!util_1.isFunction(conditionOrItem)) {
+ return map.has(conditionOrItem);
+ }
+ else {
+ try {
+ for (var map_2 = __values(map), map_2_1 = map_2.next(); !map_2_1.done; map_2_1 = map_2.next()) {
+ var item = map_2_1.value;
+ if (!!conditionOrItem.call(null, item)) {
+ return true;
+ }
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (map_2_1 && !map_2_1.done && (_a = map_2.return)) _a.call(map_2);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ return false;
+ }
+}
+exports.contains = contains;
+/**
+ * Gets the keys of the map.
+ *
+ * @param map - a map
+ */
+function keys(map) {
+ return new Set(map.keys());
+}
+exports.keys = keys;
+/**
+ * Gets the values of the map.
+ *
+ * @param map - a map
+ */
+function values(map) {
+ return __spread(map.values());
+}
+exports.values = values;
+/**
+ * Gets the size of the map.
+ *
+ * @param map - a map
+ * @param condition - an optional condition to match
+ */
+function size(map, condition) {
+ var e_4, _a;
+ if (condition === undefined) {
+ return map.size;
+ }
+ else {
+ var count = 0;
+ try {
+ for (var map_3 = __values(map), map_3_1 = map_3.next(); !map_3_1.done; map_3_1 = map_3.next()) {
+ var item = map_3_1.value;
+ if (!!condition.call(null, item)) {
+ count++;
+ }
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (map_3_1 && !map_3_1.done && (_a = map_3.return)) _a.call(map_3);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+ return count;
+ }
+}
+exports.size = size;
+/**
+ * Determines if the map is empty.
+ *
+ * @param map - a map
+ */
+function isEmpty(map) {
+ return map.size === 0;
+}
+exports.isEmpty = isEmpty;
+/**
+ * Returns an iterator for the items of the map.
+ *
+ * @param map - a map
+ * @param condition - an optional condition to match
+ */
+function forEach(map, condition) {
+ var map_4, map_4_1, item, e_5_1;
+ var e_5, _a;
+ return __generator(this, function (_b) {
+ switch (_b.label) {
+ case 0:
+ if (!(condition === undefined)) return [3 /*break*/, 2];
+ return [5 /*yield**/, __values(map)];
+ case 1:
+ _b.sent();
+ return [3 /*break*/, 9];
+ case 2:
+ _b.trys.push([2, 7, 8, 9]);
+ map_4 = __values(map), map_4_1 = map_4.next();
+ _b.label = 3;
+ case 3:
+ if (!!map_4_1.done) return [3 /*break*/, 6];
+ item = map_4_1.value;
+ if (!!!condition.call(null, item)) return [3 /*break*/, 5];
+ return [4 /*yield*/, item];
+ case 4:
+ _b.sent();
+ _b.label = 5;
+ case 5:
+ map_4_1 = map_4.next();
+ return [3 /*break*/, 3];
+ case 6: return [3 /*break*/, 9];
+ case 7:
+ e_5_1 = _b.sent();
+ e_5 = { error: e_5_1 };
+ return [3 /*break*/, 9];
+ case 8:
+ try {
+ if (map_4_1 && !map_4_1.done && (_a = map_4.return)) _a.call(map_4);
+ }
+ finally { if (e_5) throw e_5.error; }
+ return [7 /*endfinally*/];
+ case 9: return [2 /*return*/];
+ }
+ });
+}
+exports.forEach = forEach;
+/**
+ * Creates and returns a shallow clone of map.
+ *
+ * @param map - a map
+ */
+function clone(map) {
+ return new Map(map);
+}
+exports.clone = clone;
+/**
+ * Returns a new map containing items from the map sorted in ascending
+ * order.
+ *
+ * @param map - a map
+ * @param lessThanAlgo - a function that returns `true` if its first argument
+ * is less than its second argument, and `false` otherwise.
+ */
+function sortInAscendingOrder(map, lessThanAlgo) {
+ var list = new (Array.bind.apply(Array, __spread([void 0], map)))();
+ list.sort(function (itemA, itemB) {
+ return lessThanAlgo.call(null, itemA, itemB) ? -1 : 1;
+ });
+ return new Map(list);
+}
+exports.sortInAscendingOrder = sortInAscendingOrder;
+/**
+ * Returns a new map containing items from the map sorted in descending
+ * order.
+ *
+ * @param map - a map
+ * @param lessThanAlgo - a function that returns `true` if its first argument
+ * is less than its second argument, and `false` otherwise.
+ */
+function sortInDescendingOrder(map, lessThanAlgo) {
+ var list = new (Array.bind.apply(Array, __spread([void 0], map)))();
+ list.sort(function (itemA, itemB) {
+ return lessThanAlgo.call(null, itemA, itemB) ? 1 : -1;
+ });
+ return new Map(list);
+}
+exports.sortInDescendingOrder = sortInDescendingOrder;
+//# sourceMappingURL=Map.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/Map.js.map b/node_modules/@oozcitak/infra/lib/Map.js.map
new file mode 100644
index 0000000..34f2cbc
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Map.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Map.js","sourceRoot":"","sources":["../src/Map.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA2C;AAE3C;;;;;GAKG;AACH,SAAgB,GAAG,CAAO,GAAc,EAAE,GAAM;IAC9C,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACrB,CAAC;AAFD,kBAEC;AAED;;;;;;GAMG;AACH,SAAgB,GAAG,CAAO,GAAc,EAAE,GAAM,EAAE,GAAK;IACrD,G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AAA;AAC3B,CAAC;AAFD,sBAEC;AAED;;;;;;;GAOG;AACH,SAAgB,oBAAoB,CAAO,GAAc,EACvD,YAAyD;IACzD,IAAM,IAAI,QAAO,KAAK,YAAL,KAAK,qBAAY,GAAG,KAAC,CAAA;IACtC,IAAI,CAAC,IAAI,CAAC,UAAC,KAAK,EAAE,KAAK;QACrB,OAAA,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAA9C,CAA8C,CAAC,CAAA;IACjD,OAAO,IAAI,GAAG,CAAO,IAAI,CAAC,CAAA;AAC5B,CAAC;AAND,oDAMC;AAED;;;;;;;GAOG;AACH,SAAgB,qBAAqB,CAAO,GAAc,EACxD,YAAyD;IACzD,IAAM,IAAI,QAAO,KAAK,YAAL,KAAK,qBAAY,GAAG,KAAC,CAAA;IACtC,IAAI,CAAC,IAAI,CAAC,UAAC,KAAK,EAAE,KAAK;QACrB,OAAA,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAA9C,CAA8C,CAAC,CAAA;IACjD,OAAO,IAAI,GAAG,CAAO,IAAI,CAAC,CAAA;AAC5B,CAAC;AAND,sDAMC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/Namespace.d.ts b/node_modules/@oozcitak/infra/lib/Namespace.d.ts
new file mode 100644
index 0000000..edc3a10
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Namespace.d.ts
@@ -0,0 +1,6 @@
+export declare const HTML = "http://www.w3.org/1999/xhtml";
+export declare const XML = "http://www.w3.org/XML/1998/namespace";
+export declare const XMLNS = "http://www.w3.org/2000/xmlns/";
+export declare const MathML = "http://www.w3.org/1998/Math/MathML";
+export declare const SVG = "http://www.w3.org/2000/svg";
+export declare const XLink = "http://www.w3.org/1999/xlink";
diff --git a/node_modules/@oozcitak/infra/lib/Namespace.js b/node_modules/@oozcitak/infra/lib/Namespace.js
new file mode 100644
index 0000000..67594f3
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Namespace.js
@@ -0,0 +1,9 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.HTML = "http://www.w3.org/1999/xhtml";
+exports.XML = "http://www.w3.org/XML/1998/namespace";
+exports.XMLNS = "http://www.w3.org/2000/xmlns/";
+exports.MathML = "http://www.w3.org/1998/Math/MathML";
+exports.SVG = "http://www.w3.org/2000/svg";
+exports.XLink = "http://www.w3.org/1999/xlink";
+//# sourceMappingURL=Namespace.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/Namespace.js.map b/node_modules/@oozcitak/infra/lib/Namespace.js.map
new file mode 100644
index 0000000..6879286
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Namespace.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Namespace.js","sourceRoot":"","sources":["../src/Namespace.ts"],"names":[],"mappings":";;AAAa,QAAA,IAAI,GAAG,8BAA8B,CAAA;AACrC,QAAA,GAAG,GAAG,sCAAsC,CAAA;AAC5C,QAAA,KAAK,GAAG,+BAA+B,CAAA;AACvC,QAAA,MAAM,GAAG,oCAAoC,CAAA;AAC7C,QAAA,GAAG,GAAG,4BAA4B,CAAA;AAClC,QAAA,KAAK,GAAG,8BAA8B,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/Queue.d.ts b/node_modules/@oozcitak/infra/lib/Queue.d.ts
new file mode 100644
index 0000000..92eda5c
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Queue.d.ts
@@ -0,0 +1,13 @@
+/**
+ * Appends the given item to the queue.
+ *
+ * @param list - a list
+ * @param item - an item
+ */
+export declare function enqueue(list: Array, item: T): void;
+/**
+ * Removes and returns an item from the queue.
+ *
+ * @param list - a list
+ */
+export declare function dequeue(list: Array): T | null;
diff --git a/node_modules/@oozcitak/infra/lib/Queue.js b/node_modules/@oozcitak/infra/lib/Queue.js
new file mode 100644
index 0000000..7da1d0e
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Queue.js
@@ -0,0 +1,22 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Appends the given item to the queue.
+ *
+ * @param list - a list
+ * @param item - an item
+ */
+function enqueue(list, item) {
+ list.push(item);
+}
+exports.enqueue = enqueue;
+/**
+ * Removes and returns an item from the queue.
+ *
+ * @param list - a list
+ */
+function dequeue(list) {
+ return list.shift() || null;
+}
+exports.dequeue = dequeue;
+//# sourceMappingURL=Queue.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/Queue.js.map b/node_modules/@oozcitak/infra/lib/Queue.js.map
new file mode 100644
index 0000000..dc596e6
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Queue.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Queue.js","sourceRoot":"","sources":["../src/Queue.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,SAAgB,OAAO,CAAI,IAAc,EAAE,IAAO;IAChD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACjB,CAAC;AAFD,0BAEC;AAED;;;;GAIG;AACH,SAAgB,OAAO,CAAI,IAAc;IACvC,OAAO,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,CAAA;AAC7B,CAAC;AAFD,0BAEC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/Set.d.ts b/node_modules/@oozcitak/infra/lib/Set.d.ts
new file mode 100644
index 0000000..96f5eb8
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Set.d.ts
@@ -0,0 +1,136 @@
+/**
+ * Adds the given item to the end of the set.
+ *
+ * @param set - a set
+ * @param item - an item
+ */
+export declare function append(set: Set, item: T): void;
+/**
+ * Extends a set by appending all items from another set.
+ *
+ * @param setA - a list to extend
+ * @param setB - a list containing items to append to `setA`
+ */
+export declare function extend(setA: Set, setB: Set): void;
+/**
+ * Inserts the given item to the start of the set.
+ *
+ * @param set - a set
+ * @param item - an item
+ */
+export declare function prepend(set: Set, item: T): void;
+/**
+ * Replaces the given item or all items matching condition with a new item.
+ *
+ * @param set - a set
+ * @param conditionOrItem - an item to replace or a condition matching items
+ * to replace
+ * @param item - an item
+ */
+export declare function replace(set: Set, conditionOrItem: T | ((item: T) => boolean), newItem: T): void;
+/**
+ * Inserts the given item before the given index.
+ *
+ * @param set - a set
+ * @param item - an item
+ */
+export declare function insert(set: Set, item: T, index: number): void;
+/**
+ * Removes the given item or all items matching condition.
+ *
+ * @param set - a set
+ * @param conditionOrItem - an item to remove or a condition matching items
+ * to remove
+ */
+export declare function remove(set: Set, conditionOrItem: T | ((item: T) => boolean)): void;
+/**
+ * Removes all items from the set.
+ */
+export declare function empty(set: Set): void;
+/**
+ * Determines if the set contains the given item or any items matching
+ * condition.
+ *
+ * @param set - a set
+ * @param conditionOrItem - an item to a condition to match
+ */
+export declare function contains(set: Set, conditionOrItem: T | ((item: T) => boolean)): boolean;
+/**
+ * Returns the count of items in the set matching the given condition.
+ *
+ * @param set - a set
+ * @param condition - an optional condition to match
+ */
+export declare function size(set: Set, condition?: ((item: T) => boolean)): number;
+/**
+ * Determines if the set is empty.
+ *
+ * @param set - a set
+ */
+export declare function isEmpty(set: Set): boolean;
+/**
+ * Returns an iterator for the items of the set.
+ *
+ * @param set - a set
+ * @param condition - an optional condition to match
+ */
+export declare function forEach(set: Set, condition?: ((item: T) => boolean)): IterableIterator;
+/**
+ * Creates and returns a shallow clone of set.
+ *
+ * @param set - a set
+ */
+export declare function clone(set: Set): Set;
+/**
+ * Returns a new set containing items from the set sorted in ascending
+ * order.
+ *
+ * @param set - a set
+ * @param lessThanAlgo - a function that returns `true` if its first argument
+ * is less than its second argument, and `false` otherwise.
+ */
+export declare function sortInAscendingOrder(set: Set, lessThanAlgo: ((itemA: T, itemB: T) => boolean)): Set;
+/**
+ * Returns a new set containing items from the set sorted in descending
+ * order.
+ *
+ * @param set - a set
+ * @param lessThanAlgo - a function that returns `true` if its first argument
+ * is less than its second argument, and `false` otherwise.
+ */
+export declare function sortInDescendingOrder(set: Set, lessThanAlgo: ((itemA: T, itemB: T) => boolean)): Set;
+/**
+ * Determines if a set is a subset of another set.
+ *
+ * @param subset - a set
+ * @param superset - a superset possibly containing all items from `subset`.
+ */
+export declare function isSubsetOf(subset: Set, superset: Set): boolean;
+/**
+ * Determines if a set is a superset of another set.
+ *
+ * @param superset - a set
+ * @param subset - a subset possibly contained within `superset`.
+ */
+export declare function isSupersetOf(superset: Set, subset: Set): boolean;
+/**
+ * Returns a new set with items that are contained in both sets.
+ *
+ * @param setA - a set
+ * @param setB - a set
+ */
+export declare function intersection(setA: Set, setB: Set): Set;
+/**
+ * Returns a new set with items from both sets.
+ *
+ * @param setA - a set
+ * @param setB - a set
+ */
+export declare function union(setA: Set, setB: Set): Set;
+/**
+ * Returns a set of integers from `n` to `m` inclusive.
+ *
+ * @param n - starting number
+ * @param m - ending number
+ */
+export declare function range(n: number, m: number): Set;
diff --git a/node_modules/@oozcitak/infra/lib/Set.js b/node_modules/@oozcitak/infra/lib/Set.js
new file mode 100644
index 0000000..5ac7511
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Set.js
@@ -0,0 +1,467 @@
+"use strict";
+var __generator = (this && this.__generator) || function (thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (_) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+};
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+var __spread = (this && this.__spread) || function () {
+ for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("@oozcitak/util");
+/**
+ * Adds the given item to the end of the set.
+ *
+ * @param set - a set
+ * @param item - an item
+ */
+function append(set, item) {
+ set.add(item);
+}
+exports.append = append;
+/**
+ * Extends a set by appending all items from another set.
+ *
+ * @param setA - a list to extend
+ * @param setB - a list containing items to append to `setA`
+ */
+function extend(setA, setB) {
+ setB.forEach(setA.add, setA);
+}
+exports.extend = extend;
+/**
+ * Inserts the given item to the start of the set.
+ *
+ * @param set - a set
+ * @param item - an item
+ */
+function prepend(set, item) {
+ var cloned = new Set(set);
+ set.clear();
+ set.add(item);
+ cloned.forEach(set.add, set);
+}
+exports.prepend = prepend;
+/**
+ * Replaces the given item or all items matching condition with a new item.
+ *
+ * @param set - a set
+ * @param conditionOrItem - an item to replace or a condition matching items
+ * to replace
+ * @param item - an item
+ */
+function replace(set, conditionOrItem, newItem) {
+ var e_1, _a;
+ var newSet = new Set();
+ try {
+ for (var set_1 = __values(set), set_1_1 = set_1.next(); !set_1_1.done; set_1_1 = set_1.next()) {
+ var oldItem = set_1_1.value;
+ if (util_1.isFunction(conditionOrItem)) {
+ if (!!conditionOrItem.call(null, oldItem)) {
+ newSet.add(newItem);
+ }
+ else {
+ newSet.add(oldItem);
+ }
+ }
+ else if (oldItem === conditionOrItem) {
+ newSet.add(newItem);
+ }
+ else {
+ newSet.add(oldItem);
+ }
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (set_1_1 && !set_1_1.done && (_a = set_1.return)) _a.call(set_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ set.clear();
+ newSet.forEach(set.add, set);
+}
+exports.replace = replace;
+/**
+ * Inserts the given item before the given index.
+ *
+ * @param set - a set
+ * @param item - an item
+ */
+function insert(set, item, index) {
+ var e_2, _a;
+ var newSet = new Set();
+ var i = 0;
+ try {
+ for (var set_2 = __values(set), set_2_1 = set_2.next(); !set_2_1.done; set_2_1 = set_2.next()) {
+ var oldItem = set_2_1.value;
+ if (i === index)
+ newSet.add(item);
+ newSet.add(oldItem);
+ i++;
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (set_2_1 && !set_2_1.done && (_a = set_2.return)) _a.call(set_2);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ set.clear();
+ newSet.forEach(set.add, set);
+}
+exports.insert = insert;
+/**
+ * Removes the given item or all items matching condition.
+ *
+ * @param set - a set
+ * @param conditionOrItem - an item to remove or a condition matching items
+ * to remove
+ */
+function remove(set, conditionOrItem) {
+ var e_3, _a, e_4, _b;
+ if (!util_1.isFunction(conditionOrItem)) {
+ set.delete(conditionOrItem);
+ }
+ else {
+ var toRemove = [];
+ try {
+ for (var set_3 = __values(set), set_3_1 = set_3.next(); !set_3_1.done; set_3_1 = set_3.next()) {
+ var item = set_3_1.value;
+ if (!!conditionOrItem.call(null, item)) {
+ toRemove.push(item);
+ }
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (set_3_1 && !set_3_1.done && (_a = set_3.return)) _a.call(set_3);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ try {
+ for (var toRemove_1 = __values(toRemove), toRemove_1_1 = toRemove_1.next(); !toRemove_1_1.done; toRemove_1_1 = toRemove_1.next()) {
+ var oldItem = toRemove_1_1.value;
+ set.delete(oldItem);
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (toRemove_1_1 && !toRemove_1_1.done && (_b = toRemove_1.return)) _b.call(toRemove_1);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+ }
+}
+exports.remove = remove;
+/**
+ * Removes all items from the set.
+ */
+function empty(set) {
+ set.clear();
+}
+exports.empty = empty;
+/**
+ * Determines if the set contains the given item or any items matching
+ * condition.
+ *
+ * @param set - a set
+ * @param conditionOrItem - an item to a condition to match
+ */
+function contains(set, conditionOrItem) {
+ var e_5, _a;
+ if (!util_1.isFunction(conditionOrItem)) {
+ return set.has(conditionOrItem);
+ }
+ else {
+ try {
+ for (var set_4 = __values(set), set_4_1 = set_4.next(); !set_4_1.done; set_4_1 = set_4.next()) {
+ var oldItem = set_4_1.value;
+ if (!!conditionOrItem.call(null, oldItem)) {
+ return true;
+ }
+ }
+ }
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
+ finally {
+ try {
+ if (set_4_1 && !set_4_1.done && (_a = set_4.return)) _a.call(set_4);
+ }
+ finally { if (e_5) throw e_5.error; }
+ }
+ }
+ return false;
+}
+exports.contains = contains;
+/**
+ * Returns the count of items in the set matching the given condition.
+ *
+ * @param set - a set
+ * @param condition - an optional condition to match
+ */
+function size(set, condition) {
+ var e_6, _a;
+ if (condition === undefined) {
+ return set.size;
+ }
+ else {
+ var count = 0;
+ try {
+ for (var set_5 = __values(set), set_5_1 = set_5.next(); !set_5_1.done; set_5_1 = set_5.next()) {
+ var item = set_5_1.value;
+ if (!!condition.call(null, item)) {
+ count++;
+ }
+ }
+ }
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
+ finally {
+ try {
+ if (set_5_1 && !set_5_1.done && (_a = set_5.return)) _a.call(set_5);
+ }
+ finally { if (e_6) throw e_6.error; }
+ }
+ return count;
+ }
+}
+exports.size = size;
+/**
+ * Determines if the set is empty.
+ *
+ * @param set - a set
+ */
+function isEmpty(set) {
+ return set.size === 0;
+}
+exports.isEmpty = isEmpty;
+/**
+ * Returns an iterator for the items of the set.
+ *
+ * @param set - a set
+ * @param condition - an optional condition to match
+ */
+function forEach(set, condition) {
+ var set_6, set_6_1, item, e_7_1;
+ var e_7, _a;
+ return __generator(this, function (_b) {
+ switch (_b.label) {
+ case 0:
+ if (!(condition === undefined)) return [3 /*break*/, 2];
+ return [5 /*yield**/, __values(set)];
+ case 1:
+ _b.sent();
+ return [3 /*break*/, 9];
+ case 2:
+ _b.trys.push([2, 7, 8, 9]);
+ set_6 = __values(set), set_6_1 = set_6.next();
+ _b.label = 3;
+ case 3:
+ if (!!set_6_1.done) return [3 /*break*/, 6];
+ item = set_6_1.value;
+ if (!!!condition.call(null, item)) return [3 /*break*/, 5];
+ return [4 /*yield*/, item];
+ case 4:
+ _b.sent();
+ _b.label = 5;
+ case 5:
+ set_6_1 = set_6.next();
+ return [3 /*break*/, 3];
+ case 6: return [3 /*break*/, 9];
+ case 7:
+ e_7_1 = _b.sent();
+ e_7 = { error: e_7_1 };
+ return [3 /*break*/, 9];
+ case 8:
+ try {
+ if (set_6_1 && !set_6_1.done && (_a = set_6.return)) _a.call(set_6);
+ }
+ finally { if (e_7) throw e_7.error; }
+ return [7 /*endfinally*/];
+ case 9: return [2 /*return*/];
+ }
+ });
+}
+exports.forEach = forEach;
+/**
+ * Creates and returns a shallow clone of set.
+ *
+ * @param set - a set
+ */
+function clone(set) {
+ return new Set(set);
+}
+exports.clone = clone;
+/**
+ * Returns a new set containing items from the set sorted in ascending
+ * order.
+ *
+ * @param set - a set
+ * @param lessThanAlgo - a function that returns `true` if its first argument
+ * is less than its second argument, and `false` otherwise.
+ */
+function sortInAscendingOrder(set, lessThanAlgo) {
+ var list = new (Array.bind.apply(Array, __spread([void 0], set)))();
+ list.sort(function (itemA, itemB) {
+ return lessThanAlgo.call(null, itemA, itemB) ? -1 : 1;
+ });
+ return new Set(list);
+}
+exports.sortInAscendingOrder = sortInAscendingOrder;
+/**
+ * Returns a new set containing items from the set sorted in descending
+ * order.
+ *
+ * @param set - a set
+ * @param lessThanAlgo - a function that returns `true` if its first argument
+ * is less than its second argument, and `false` otherwise.
+ */
+function sortInDescendingOrder(set, lessThanAlgo) {
+ var list = new (Array.bind.apply(Array, __spread([void 0], set)))();
+ list.sort(function (itemA, itemB) {
+ return lessThanAlgo.call(null, itemA, itemB) ? 1 : -1;
+ });
+ return new Set(list);
+}
+exports.sortInDescendingOrder = sortInDescendingOrder;
+/**
+ * Determines if a set is a subset of another set.
+ *
+ * @param subset - a set
+ * @param superset - a superset possibly containing all items from `subset`.
+ */
+function isSubsetOf(subset, superset) {
+ var e_8, _a;
+ try {
+ for (var subset_1 = __values(subset), subset_1_1 = subset_1.next(); !subset_1_1.done; subset_1_1 = subset_1.next()) {
+ var item = subset_1_1.value;
+ if (!superset.has(item))
+ return false;
+ }
+ }
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
+ finally {
+ try {
+ if (subset_1_1 && !subset_1_1.done && (_a = subset_1.return)) _a.call(subset_1);
+ }
+ finally { if (e_8) throw e_8.error; }
+ }
+ return true;
+}
+exports.isSubsetOf = isSubsetOf;
+/**
+ * Determines if a set is a superset of another set.
+ *
+ * @param superset - a set
+ * @param subset - a subset possibly contained within `superset`.
+ */
+function isSupersetOf(superset, subset) {
+ return isSubsetOf(subset, superset);
+}
+exports.isSupersetOf = isSupersetOf;
+/**
+ * Returns a new set with items that are contained in both sets.
+ *
+ * @param setA - a set
+ * @param setB - a set
+ */
+function intersection(setA, setB) {
+ var e_9, _a;
+ var newSet = new Set();
+ try {
+ for (var setA_1 = __values(setA), setA_1_1 = setA_1.next(); !setA_1_1.done; setA_1_1 = setA_1.next()) {
+ var item = setA_1_1.value;
+ if (setB.has(item))
+ newSet.add(item);
+ }
+ }
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
+ finally {
+ try {
+ if (setA_1_1 && !setA_1_1.done && (_a = setA_1.return)) _a.call(setA_1);
+ }
+ finally { if (e_9) throw e_9.error; }
+ }
+ return newSet;
+}
+exports.intersection = intersection;
+/**
+ * Returns a new set with items from both sets.
+ *
+ * @param setA - a set
+ * @param setB - a set
+ */
+function union(setA, setB) {
+ var newSet = new Set(setA);
+ setB.forEach(newSet.add, newSet);
+ return newSet;
+}
+exports.union = union;
+/**
+ * Returns a set of integers from `n` to `m` inclusive.
+ *
+ * @param n - starting number
+ * @param m - ending number
+ */
+function range(n, m) {
+ var newSet = new Set();
+ for (var i = n; i <= m; i++) {
+ newSet.add(i);
+ }
+ return newSet;
+}
+exports.range = range;
+//# sourceMappingURL=Set.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/Set.js.map b/node_modules/@oozcitak/infra/lib/Set.js.map
new file mode 100644
index 0000000..0c39674
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Set.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Set.js","sourceRoot":"","sources":["../src/Set.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA2C;AAE3C;;;;;GAKG;AACH,SAAgB,MAAM,CAAI,GAAW,EAAE,IAAO;IAC5C,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AACf,CAAC;AAFD,wBAEC;AAED;;;;;GAKG;AACH,SAAgB,MAAM,CAAI,IAAY,EAAE,IAAY;IAClD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;AAC9B,CAAC;AAFD,wBAEC;AAED;;;;;GAKG;AACH,SAAgB,OAAO,CAAI,GAAW,EAAE,IAAO;IAC7C,IAAM,MAAM,GAAG,IAAI,GAAG,CAAI,GAAG,CAAC,CAAA;IAC9B,GAAG,CAAC,KAAK,EAAE,CAAA;IACX,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IACb,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;AAC9B,CAAC;AALD,0BAKC;AAED;;;;;;;GAOG;AACH,SAAgB,OAAO,CAAI,GAAW,EAAE,eAA2C,EACjF,OAAU;;IACV,IAAM,MAAM,GAAG,IAAI,GAAG,EAAK,CAAA;;QAC3B,KAAsB,IAAA,QAAA,SAAA,GAAG,CAAA,wBAAA,yCAAE;YAAtB,IAAM,OAAO,gBAAA;YAChB,IAAI,iBAAU,CAAC,eAAe,CAAC,EAAE;gBAC/B,IAAI,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE;oBACzC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;i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CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;IAChC,OAAO,MAAM,CAAA;AACf,CAAC;AAJD,sBAIC;AAED;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,CAAS,EAAE,CAAS;IACxC,IAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAA;IAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QAC3B,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;KACd;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAND,sBAMC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/Stack.d.ts b/node_modules/@oozcitak/infra/lib/Stack.d.ts
new file mode 100644
index 0000000..cce96f3
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Stack.d.ts
@@ -0,0 +1,13 @@
+/**
+ * Pushes the given item to the stack.
+ *
+ * @param list - a list
+ * @param item - an item
+ */
+export declare function push(list: Array, item: T): void;
+/**
+ * Pops and returns an item from the stack.
+ *
+ * @param list - a list
+ */
+export declare function pop(list: Array): T | null;
diff --git a/node_modules/@oozcitak/infra/lib/Stack.js b/node_modules/@oozcitak/infra/lib/Stack.js
new file mode 100644
index 0000000..3208584
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Stack.js
@@ -0,0 +1,22 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Pushes the given item to the stack.
+ *
+ * @param list - a list
+ * @param item - an item
+ */
+function push(list, item) {
+ list.push(item);
+}
+exports.push = push;
+/**
+ * Pops and returns an item from the stack.
+ *
+ * @param list - a list
+ */
+function pop(list) {
+ return list.pop() || null;
+}
+exports.pop = pop;
+//# sourceMappingURL=Stack.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/Stack.js.map b/node_modules/@oozcitak/infra/lib/Stack.js.map
new file mode 100644
index 0000000..e85bd78
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/Stack.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Stack.js","sourceRoot":"","sources":["../src/Stack.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,SAAgB,IAAI,CAAI,IAAc,EAAE,IAAO;IAC7C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACjB,CAAC;AAFD,oBAEC;AAED;;;;GAIG;AACH,SAAgB,GAAG,CAAI,IAAc;IACnC,OAAO,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAA;AAC3B,CAAC;AAFD,kBAEC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/String.d.ts b/node_modules/@oozcitak/infra/lib/String.d.ts
new file mode 100644
index 0000000..41eecce
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/String.d.ts
@@ -0,0 +1,129 @@
+/**
+ * Determines if the string `a` is a code unit prefix of string `b`.
+ *
+ * @param a - a string
+ * @param b - a string
+ */
+export declare function isCodeUnitPrefix(a: string, b: string): boolean;
+/**
+ * Determines if the string `a` is a code unit less than string `b`.
+ *
+ * @param a - a string
+ * @param b - a string
+ */
+export declare function isCodeUnitLessThan(a: string, b: string): boolean;
+/**
+ * Isomorphic encodes the given string.
+ *
+ * @param str - a string
+ */
+export declare function isomorphicEncode(str: string): Uint8Array;
+/**
+ * Determines if the given string is An ASCII string.
+ *
+ * @param str - a string
+ */
+export declare function isASCIIString(str: string): boolean;
+/**
+ * Converts all uppercase ASCII code points to lowercase.
+ *
+ * @param str - a string
+ */
+export declare function asciiLowercase(str: string): string;
+/**
+ * Converts all uppercase ASCII code points to uppercase.
+ *
+ * @param str - a string
+ */
+export declare function asciiUppercase(str: string): string;
+/**
+ * Compares two ASCII strings case-insensitively.
+ *
+ * @param a - a string
+ * @param b - a string
+ */
+export declare function asciiCaseInsensitiveMatch(a: string, b: string): boolean;
+/**
+ * ASCII encodes a string.
+ *
+ * @param str - a string
+ */
+export declare function asciiEncode(str: string): Uint8Array;
+/**
+ * ASCII decodes a byte sequence.
+ *
+ * @param bytes - a byte sequence
+ */
+export declare function asciiDecode(bytes: Uint8Array): string;
+/**
+ * Strips newline characters from a string.
+ *
+ * @param str - a string
+ */
+export declare function stripNewlines(str: string): string;
+/**
+ * Normalizes newline characters in a string by converting consecutive
+ * carriage-return newline characters and also single carriage return characters
+ * into a single newline.
+ *
+ * @param str - a string
+ */
+export declare function normalizeNewlines(str: string): string;
+/**
+ * Removes leading and trailing whitespace characters from a string.
+ *
+ * @param str - a string
+ */
+export declare function stripLeadingAndTrailingASCIIWhitespace(str: string): string;
+/**
+ * Removes consecutive newline characters from a string.
+ *
+ * @param str - a string
+ */
+export declare function stripAndCollapseASCIIWhitespace(str: string): string;
+/**
+ * Collects a sequence of code points matching a given condition from the input
+ * string.
+ *
+ * @param condition - a condition to match
+ * @param input - a string
+ * @param options - starting position
+ */
+export declare function collectASequenceOfCodePoints(condition: ((str: string) => boolean), input: string | string[], options: {
+ position: number;
+}): string;
+/**
+ * Skips over ASCII whitespace.
+ *
+ * @param input - input string
+ * @param options - starting position
+ */
+export declare function skipASCIIWhitespace(input: string | string[], options: {
+ position: number;
+}): void;
+/**
+ * Solits a string at the given delimiter.
+ *
+ * @param input - input string
+ * @param delimiter - a delimiter string
+ */
+export declare function strictlySplit(input: string | string[], delimiter: string): string[];
+/**
+ * Splits a string on ASCII whitespace.
+ *
+ * @param input - a string
+ */
+export declare function splitAStringOnASCIIWhitespace(input: string | string[]): string[];
+/**
+ * Splits a string on commas.
+ *
+ * @param input - a string
+ */
+export declare function splitAStringOnCommas(input: string | string[]): string[];
+/**
+ * Concatenates a list of strings with the given separator.
+ *
+ * @param list - a list of strings
+ * @param separator - a separator string
+ */
+export declare function concatenate(list: string[], separator?: string): string;
diff --git a/node_modules/@oozcitak/infra/lib/String.js b/node_modules/@oozcitak/infra/lib/String.js
new file mode 100644
index 0000000..3b6b1db
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/String.js
@@ -0,0 +1,472 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var CodePoints_1 = require("./CodePoints");
+var ByteSequence_1 = require("./ByteSequence");
+var Byte_1 = require("./Byte");
+var util_1 = require("@oozcitak/util");
+/**
+ * Determines if the string `a` is a code unit prefix of string `b`.
+ *
+ * @param a - a string
+ * @param b - a string
+ */
+function isCodeUnitPrefix(a, b) {
+ /**
+ * 1. Let i be 0.
+ * 2. While true:
+ * 2.1. Let aCodeUnit be the ith code unit of a if i is less than a’s length;
+ * otherwise null.
+ * 2.2. Let bCodeUnit be the ith code unit of b if i is less than b’s length;
+ * otherwise null.
+ * 2.3. If bCodeUnit is null, then return true.
+ * 2.4. Return false if aCodeUnit is different from bCodeUnit.
+ * 2.5. Set i to i + 1.
+ */
+ var i = 0;
+ while (true) {
+ var aCodeUnit = i < a.length ? a.charCodeAt(i) : null;
+ var bCodeUnit = i < b.length ? b.charCodeAt(i) : null;
+ if (aCodeUnit === null)
+ return true;
+ if (aCodeUnit !== bCodeUnit)
+ return false;
+ i++;
+ }
+}
+exports.isCodeUnitPrefix = isCodeUnitPrefix;
+/**
+ * Determines if the string `a` is a code unit less than string `b`.
+ *
+ * @param a - a string
+ * @param b - a string
+ */
+function isCodeUnitLessThan(a, b) {
+ /**
+ * 1. If b is a code unit prefix of a, then return false.
+ * 2. If a is a code unit prefix of b, then return true.
+ * 3. Let n be the smallest index such that the nth code unit of a is
+ * different from the nth code unit of b. (There has to be such an index,
+ * since neither string is a prefix of the other.)
+ * 4. If the nth code unit of a is less than the nth code unit of b, then
+ * return true.
+ * 5. Return false.
+ */
+ if (isCodeUnitPrefix(b, a))
+ return false;
+ if (isCodeUnitPrefix(a, b))
+ return true;
+ for (var i = 0; i < Math.min(a.length, b.length); i++) {
+ var aCodeUnit = a.charCodeAt(i);
+ var bCodeUnit = b.charCodeAt(i);
+ if (aCodeUnit === bCodeUnit)
+ continue;
+ return (aCodeUnit < bCodeUnit);
+ }
+ /* istanbul ignore next */
+ return false;
+}
+exports.isCodeUnitLessThan = isCodeUnitLessThan;
+/**
+ * Isomorphic encodes the given string.
+ *
+ * @param str - a string
+ */
+function isomorphicEncode(str) {
+ var e_1, _a;
+ /**
+ * 1. Assert: input contains no code points greater than U+00FF.
+ * 2. Return a byte sequence whose length is equal to input’s length and whose
+ * bytes have the same values as input’s code points, in the same order.
+ */
+ var codePoints = Array.from(str);
+ var bytes = new Uint8Array(codePoints.length);
+ var i = 0;
+ try {
+ for (var str_1 = __values(str), str_1_1 = str_1.next(); !str_1_1.done; str_1_1 = str_1.next()) {
+ var codePoint = str_1_1.value;
+ var byte = codePoint.codePointAt(0);
+ console.assert(byte !== undefined && byte <= 0x00FF, "isomorphicEncode requires string bytes to be less than or equal to 0x00FF.");
+ if (byte !== undefined && byte <= 0x00FF) {
+ bytes[i++] = byte;
+ }
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (str_1_1 && !str_1_1.done && (_a = str_1.return)) _a.call(str_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ return bytes;
+}
+exports.isomorphicEncode = isomorphicEncode;
+/**
+ * Determines if the given string is An ASCII string.
+ *
+ * @param str - a string
+ */
+function isASCIIString(str) {
+ /**
+ * An ASCII string is a string whose code points are all ASCII code points.
+ */
+ return /^[\u0000-\u007F]*$/.test(str);
+}
+exports.isASCIIString = isASCIIString;
+/**
+ * Converts all uppercase ASCII code points to lowercase.
+ *
+ * @param str - a string
+ */
+function asciiLowercase(str) {
+ var e_2, _a;
+ /**
+ * To ASCII lowercase a string, replace all ASCII upper alphas in the string
+ * with their corresponding code point in ASCII lower alpha.
+ */
+ var result = "";
+ try {
+ for (var str_2 = __values(str), str_2_1 = str_2.next(); !str_2_1.done; str_2_1 = str_2.next()) {
+ var c = str_2_1.value;
+ var code = c.codePointAt(0);
+ if (code !== undefined && code >= 0x41 && code <= 0x5A) {
+ result += String.fromCodePoint(code + 0x20);
+ }
+ else {
+ result += c;
+ }
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (str_2_1 && !str_2_1.done && (_a = str_2.return)) _a.call(str_2);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ return result;
+}
+exports.asciiLowercase = asciiLowercase;
+/**
+ * Converts all uppercase ASCII code points to uppercase.
+ *
+ * @param str - a string
+ */
+function asciiUppercase(str) {
+ var e_3, _a;
+ /**
+ * To ASCII uppercase a string, replace all ASCII lower alphas in the string
+ * with their corresponding code point in ASCII upper alpha.
+ */
+ var result = "";
+ try {
+ for (var str_3 = __values(str), str_3_1 = str_3.next(); !str_3_1.done; str_3_1 = str_3.next()) {
+ var c = str_3_1.value;
+ var code = c.codePointAt(0);
+ if (code !== undefined && code >= 0x61 && code <= 0x7A) {
+ result += String.fromCodePoint(code - 0x20);
+ }
+ else {
+ result += c;
+ }
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (str_3_1 && !str_3_1.done && (_a = str_3.return)) _a.call(str_3);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ return result;
+}
+exports.asciiUppercase = asciiUppercase;
+/**
+ * Compares two ASCII strings case-insensitively.
+ *
+ * @param a - a string
+ * @param b - a string
+ */
+function asciiCaseInsensitiveMatch(a, b) {
+ /**
+ * A string A is an ASCII case-insensitive match for a string B, if the ASCII
+ * lowercase of A is the ASCII lowercase of B.
+ */
+ return asciiLowercase(a) === asciiLowercase(b);
+}
+exports.asciiCaseInsensitiveMatch = asciiCaseInsensitiveMatch;
+/**
+ * ASCII encodes a string.
+ *
+ * @param str - a string
+ */
+function asciiEncode(str) {
+ /**
+ * 1. Assert: input is an ASCII string.
+ * 2. Return the isomorphic encoding of input.
+ */
+ console.assert(isASCIIString(str), "asciiEncode requires an ASCII string.");
+ return isomorphicEncode(str);
+}
+exports.asciiEncode = asciiEncode;
+/**
+ * ASCII decodes a byte sequence.
+ *
+ * @param bytes - a byte sequence
+ */
+function asciiDecode(bytes) {
+ var e_4, _a;
+ try {
+ /**
+ * 1. Assert: All bytes in input are ASCII bytes.
+ * 2. Return the isomorphic decoding of input.
+ */
+ for (var bytes_1 = __values(bytes), bytes_1_1 = bytes_1.next(); !bytes_1_1.done; bytes_1_1 = bytes_1.next()) {
+ var byte = bytes_1_1.value;
+ console.assert(Byte_1.isASCIIByte(byte), "asciiDecode requires an ASCII byte sequence.");
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (bytes_1_1 && !bytes_1_1.done && (_a = bytes_1.return)) _a.call(bytes_1);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+ return ByteSequence_1.isomorphicDecode(bytes);
+}
+exports.asciiDecode = asciiDecode;
+/**
+ * Strips newline characters from a string.
+ *
+ * @param str - a string
+ */
+function stripNewlines(str) {
+ /**
+ * To strip newlines from a string, remove any U+000A LF and U+000D CR code
+ * points from the string.
+ */
+ return str.replace(/[\n\r]/g, "");
+}
+exports.stripNewlines = stripNewlines;
+/**
+ * Normalizes newline characters in a string by converting consecutive
+ * carriage-return newline characters and also single carriage return characters
+ * into a single newline.
+ *
+ * @param str - a string
+ */
+function normalizeNewlines(str) {
+ /**
+ * To normalize newlines in a string, replace every U+000D CR U+000A LF code
+ * point pair with a single U+000A LF code point, and then replace every
+ * remaining U+000D CR code point with a U+000A LF code point.
+ */
+ return str.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
+}
+exports.normalizeNewlines = normalizeNewlines;
+/**
+ * Removes leading and trailing whitespace characters from a string.
+ *
+ * @param str - a string
+ */
+function stripLeadingAndTrailingASCIIWhitespace(str) {
+ /**
+ * To strip leading and trailing ASCII whitespace from a string, remove all
+ * ASCII whitespace that are at the start or the end of the string.
+ */
+ return str.replace(/^[\t\n\f\r ]+/, "").replace(/[\t\n\f\r ]+$/, "");
+}
+exports.stripLeadingAndTrailingASCIIWhitespace = stripLeadingAndTrailingASCIIWhitespace;
+/**
+ * Removes consecutive newline characters from a string.
+ *
+ * @param str - a string
+ */
+function stripAndCollapseASCIIWhitespace(str) {
+ /**
+ * To strip and collapse ASCII whitespace in a string, replace any sequence of
+ * one or more consecutive code points that are ASCII whitespace in the string
+ * with a single U+0020 SPACE code point, and then remove any leading and
+ * trailing ASCII whitespace from that string.
+ */
+ return stripLeadingAndTrailingASCIIWhitespace(str.replace(/[\t\n\f\r ]{2,}/g, " "));
+}
+exports.stripAndCollapseASCIIWhitespace = stripAndCollapseASCIIWhitespace;
+/**
+ * Collects a sequence of code points matching a given condition from the input
+ * string.
+ *
+ * @param condition - a condition to match
+ * @param input - a string
+ * @param options - starting position
+ */
+function collectASequenceOfCodePoints(condition, input, options) {
+ /**
+ * 1. Let result be the empty string.
+ * 2. While position doesn’t point past the end of input and the code point at
+ * position within input meets the condition condition:
+ * 2.1. Append that code point to the end of result.
+ * 2.2. Advance position by 1.
+ * 3. Return result.
+ */
+ if (!util_1.isArray(input))
+ return collectASequenceOfCodePoints(condition, Array.from(input), options);
+ var result = "";
+ while (options.position < input.length && !!condition.call(null, input[options.position])) {
+ result += input[options.position];
+ options.position++;
+ }
+ return result;
+}
+exports.collectASequenceOfCodePoints = collectASequenceOfCodePoints;
+/**
+ * Skips over ASCII whitespace.
+ *
+ * @param input - input string
+ * @param options - starting position
+ */
+function skipASCIIWhitespace(input, options) {
+ /**
+ * To skip ASCII whitespace within a string input given a position variable
+ * position, collect a sequence of code points that are ASCII whitespace from
+ * input given position. The collected code points are not used, but position
+ * is still updated.
+ */
+ collectASequenceOfCodePoints(function (str) { return CodePoints_1.ASCIIWhiteSpace.test(str); }, input, options);
+}
+exports.skipASCIIWhitespace = skipASCIIWhitespace;
+/**
+ * Solits a string at the given delimiter.
+ *
+ * @param input - input string
+ * @param delimiter - a delimiter string
+ */
+function strictlySplit(input, delimiter) {
+ /**
+ * 1. Let position be a position variable for input, initially pointing at the
+ * start of input.
+ * 2. Let tokens be a list of strings, initially empty.
+ * 3. Let token be the result of collecting a sequence of code points that are
+ * not equal to delimiter from input, given position.
+ * 4. Append token to tokens.
+ * 5. While position is not past the end of input:
+ * 5.1. Assert: the code point at position within input is delimiter.
+ * 5.2. Advance position by 1.
+ * 5.3. Let token be the result of collecting a sequence of code points that
+ * are not equal to delimiter from input, given position.
+ * 5.4. Append token to tokens.
+ * 6. Return tokens.
+ */
+ if (!util_1.isArray(input))
+ return strictlySplit(Array.from(input), delimiter);
+ var options = { position: 0 };
+ var tokens = [];
+ var token = collectASequenceOfCodePoints(function (str) { return delimiter !== str; }, input, options);
+ tokens.push(token);
+ while (options.position < input.length) {
+ console.assert(input[options.position] === delimiter, "strictlySplit found no delimiter in input string.");
+ options.position++;
+ token = collectASequenceOfCodePoints(function (str) { return delimiter !== str; }, input, options);
+ tokens.push(token);
+ }
+ return tokens;
+}
+exports.strictlySplit = strictlySplit;
+/**
+ * Splits a string on ASCII whitespace.
+ *
+ * @param input - a string
+ */
+function splitAStringOnASCIIWhitespace(input) {
+ /**
+ * 1. Let position be a position variable for input, initially pointing at the
+ * start of input.
+ * 2. Let tokens be a list of strings, initially empty.
+ * 3. Skip ASCII whitespace within input given position.
+ * 4. While position is not past the end of input:
+ * 4.1. Let token be the result of collecting a sequence of code points that
+ * are not ASCII whitespace from input, given position.
+ * 4.2. Append token to tokens.
+ * 4.3. Skip ASCII whitespace within input given position.
+ * 5. Return tokens.
+ */
+ if (!util_1.isArray(input))
+ return splitAStringOnASCIIWhitespace(Array.from(input));
+ var options = { position: 0 };
+ var tokens = [];
+ skipASCIIWhitespace(input, options);
+ while (options.position < input.length) {
+ var token = collectASequenceOfCodePoints(function (str) { return !CodePoints_1.ASCIIWhiteSpace.test(str); }, input, options);
+ tokens.push(token);
+ skipASCIIWhitespace(input, options);
+ }
+ return tokens;
+}
+exports.splitAStringOnASCIIWhitespace = splitAStringOnASCIIWhitespace;
+/**
+ * Splits a string on commas.
+ *
+ * @param input - a string
+ */
+function splitAStringOnCommas(input) {
+ /**
+ * 1. Let position be a position variable for input, initially pointing at the
+ * start of input.
+ * 2. Let tokens be a list of strings, initially empty.
+ * 3. While position is not past the end of input:
+ * 3.1. Let token be the result of collecting a sequence of code points that
+ * are not U+002C (,) from input, given position.
+ * 3.2. Strip leading and trailing ASCII whitespace from token.
+ * 3.3. Append token to tokens.
+ * 3.4. If position is not past the end of input, then:
+ * 3.4.1. Assert: the code point at position within input is U+002C (,).
+ * 3.4.2. Advance position by 1.
+ * 4. Return tokens.
+ */
+ if (!util_1.isArray(input))
+ return splitAStringOnCommas(Array.from(input));
+ var options = { position: 0 };
+ var tokens = [];
+ while (options.position < input.length) {
+ var token = collectASequenceOfCodePoints(function (str) { return str !== ','; }, input, options);
+ tokens.push(stripLeadingAndTrailingASCIIWhitespace(token));
+ if (options.position < input.length) {
+ console.assert(input[options.position] === ',', "splitAStringOnCommas found no delimiter in input string.");
+ options.position++;
+ }
+ }
+ return tokens;
+}
+exports.splitAStringOnCommas = splitAStringOnCommas;
+/**
+ * Concatenates a list of strings with the given separator.
+ *
+ * @param list - a list of strings
+ * @param separator - a separator string
+ */
+function concatenate(list, separator) {
+ if (separator === void 0) { separator = ""; }
+ /**
+ * 1. If list is empty, then return the empty string.
+ * 2. If separator is not given, then set separator to the empty string.
+ * 3. Return a string whose contents are list’s items, in order, separated
+ * from each other by separator.
+ */
+ if (list.length === 0)
+ return "";
+ return list.join(separator);
+}
+exports.concatenate = concatenate;
+//# sourceMappingURL=String.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/String.js.map b/node_modules/@oozcitak/infra/lib/String.js.map
new file mode 100644
index 0000000..3d31f70
--- /dev/null
+++ b/node_modules/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B,IAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,OAAO,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,MAAM,EAAE;QACtC,IAAM,KAAK,GAAG,4BAA4B,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,KAAK,GAAG,EAAX,CAAW,EAAE,KAAK,EAAE,OAAO,CAAC,CAAA;QAC9E,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,KAAK,CAAC,CAAC,CAAA;QAC1D,IAAI,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,MAAM,EAAE;YACnC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAE,0DAA0D,CAAC,CAAA;YAC3G,OAAO,CAAC,QAAQ,EAAE,CAAA;SACnB;KACF;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AA5BD,oDA4BC;AAED;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,IAAc,EAAE,SAAsB;IAAtB,0BAAA,EAAA,cAAsB;IAChE;;;;;OAKG;IACH,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAA;IAChC,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAC7B,CAAC;AATD,kCASC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/index.d.ts b/node_modules/@oozcitak/infra/lib/index.d.ts
new file mode 100644
index 0000000..6025196
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/index.d.ts
@@ -0,0 +1,13 @@
+import * as base64 from './Base64';
+import * as byte from './Byte';
+import * as byteSequence from './ByteSequence';
+import * as codePoint from './CodePoints';
+import * as json from './JSON';
+import * as list from './List';
+import * as map from './Map';
+import * as namespace from './Namespace';
+import * as queue from './Queue';
+import * as set from './Set';
+import * as stack from './Stack';
+import * as string from './String';
+export { base64, byte, byteSequence, codePoint, json, list, map, namespace, queue, set, stack, string };
diff --git a/node_modules/@oozcitak/infra/lib/index.js b/node_modules/@oozcitak/infra/lib/index.js
new file mode 100644
index 0000000..f58f350
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/index.js
@@ -0,0 +1,34 @@
+"use strict";
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ result["default"] = mod;
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var base64 = __importStar(require("./Base64"));
+exports.base64 = base64;
+var byte = __importStar(require("./Byte"));
+exports.byte = byte;
+var byteSequence = __importStar(require("./ByteSequence"));
+exports.byteSequence = byteSequence;
+var codePoint = __importStar(require("./CodePoints"));
+exports.codePoint = codePoint;
+var json = __importStar(require("./JSON"));
+exports.json = json;
+var list = __importStar(require("./List"));
+exports.list = list;
+var map = __importStar(require("./Map"));
+exports.map = map;
+var namespace = __importStar(require("./Namespace"));
+exports.namespace = namespace;
+var queue = __importStar(require("./Queue"));
+exports.queue = queue;
+var set = __importStar(require("./Set"));
+exports.set = set;
+var stack = __importStar(require("./Stack"));
+exports.stack = stack;
+var string = __importStar(require("./String"));
+exports.string = string;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/lib/index.js.map b/node_modules/@oozcitak/infra/lib/index.js.map
new file mode 100644
index 0000000..3aac5e4
--- /dev/null
+++ b/node_modules/@oozcitak/infra/lib/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+CAAkC;AAcjC,wBAAM;AAbP,2CAA8B;AAarB,oBAAI;AAZb,2DAA8C;AAY/B,oCAAY;AAX3B,sDAAyC;AAWZ,8BAAS;AAVtC,2CAA8B;AAUU,oBAAI;AAT5C,2CAA8B;AASgB,oBAAI;AARlD,yCAA4B;AAQwB,kBAAG;AAPvD,qDAAwC;AAOiB,8BAAS;AANlE,6CAAgC;AAMoC,sBAAK;AALzE,yCAA4B;AAK+C,kBAAG;AAJ9E,6CAAgC;AAK/B,sBAAK;AAJN,+CAAkC;AAI1B,wBAAM"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/infra/package.json b/node_modules/@oozcitak/infra/package.json
new file mode 100644
index 0000000..8e9ed0d
--- /dev/null
+++ b/node_modules/@oozcitak/infra/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "@oozcitak/infra",
+ "version": "1.0.8",
+ "keywords": [
+ "infra",
+ "whatwg"
+ ],
+ "homepage": "http://github.com/oozcitak/infra",
+ "description": "An implementation of the Infra Living Standard",
+ "author": "Ozgur Ozcitak ",
+ "contributors": [],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/oozcitak/infra.git"
+ },
+ "bugs": {
+ "url": "http://github.com/oozcitak/infra/issues"
+ },
+ "main": "./lib/index",
+ "types": "lib/index.d.ts",
+ "engines": {
+ "node": ">=6.0"
+ },
+ "files": [
+ "lib/**/*"
+ ],
+ "dependencies": {
+ "@oozcitak/util": "8.3.8"
+ },
+ "devDependencies": {
+ "@types/jest": "^24.0.22",
+ "@types/node": "^12.12.6",
+ "coveralls": "^3.0.7",
+ "jest": "^24.9.0",
+ "ts-jest": "^24.1.0",
+ "typescript": "^3.7.2"
+ },
+ "jest": {
+ "transform": {
+ "^.+\\.tsx?$": "ts-jest"
+ },
+ "testRegex": "/test/.*\\.test\\.tsx?$",
+ "testEnvironment": "node",
+ "collectCoverageFrom": [
+ "src/**/*.{ts,tsx}"
+ ]
+ },
+ "scripts": {
+ "compile": "rm -rf lib && tsc --version && tsc",
+ "test": "npm run compile && jest --coverage",
+ "publish-public": "npm run test && npm publish --access public"
+ }
+}
diff --git a/node_modules/@oozcitak/url/LICENSE b/node_modules/@oozcitak/url/LICENSE
new file mode 100644
index 0000000..eee50f6
--- /dev/null
+++ b/node_modules/@oozcitak/url/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 Ozgur Ozcitak
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@oozcitak/url/README.md b/node_modules/@oozcitak/url/README.md
new file mode 100644
index 0000000..4150aad
--- /dev/null
+++ b/node_modules/@oozcitak/url/README.md
@@ -0,0 +1,27 @@
+# URL
+A Javascript implementation of the [URL Living Standard](https://url.spec.whatwg.org/).
+
+[![License](http://img.shields.io/npm/l/@oozcitak/url.svg?style=flat-square)](http://opensource.org/licenses/MIT)
+[![NPM Version](http://img.shields.io/npm/v/@oozcitak/url.svg?style=flat-square)](https://www.npmjs.com/package/@oozcitak/url)
+
+[![Travis Build Status](http://img.shields.io/travis/oozcitak/url.svg?style=flat-square)](http://travis-ci.org/oozcitak/url)
+[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/vmmfuvai1o3yips8?svg=true)](https://ci.appveyor.com/project/oozcitak/url)
+[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/url.svg?style=flat-square)](https://david-dm.org/oozcitak/url)
+[![Code Coverage](https://img.shields.io/codecov/c/github/oozcitak/url?style=flat-square)](https://codecov.io/gh/oozcitak/url)
+
+# Version
+Current version implements the standard as of commit [7ae1c69](https://url.spec.whatwg.org/commit-snapshots/7ae1c691c96f0d82fafa24c33aa1e8df9ffbf2bc/).
+
+# Installation
+```
+npm install @oozcitak/url
+```
+
+# Usage
+Create an instance of the `URL` or `URLSearchParams` classes.
+
+```js
+const { URL } = require("@oozcitak/url");
+
+const url = new URL("https://example.org/file.aspx")
+```
diff --git a/node_modules/@oozcitak/url/lib/URLAlgorithm.d.ts b/node_modules/@oozcitak/url/lib/URLAlgorithm.d.ts
new file mode 100644
index 0000000..02558fb
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/URLAlgorithm.d.ts
@@ -0,0 +1,267 @@
+import { URLRecord, ParserState, Host, Origin } from "./interfaces";
+/**
+ * Sets the callback function for validation errors.
+ *
+ * @param validationErrorCallback - a callback function to be called when a
+ * validation error occurs
+ */
+export declare function setValidationErrorCallback(validationErrorCallback?: ((message: string) => void)): void;
+/**
+ * Creates a new URL.
+ */
+export declare function newURL(): URLRecord;
+/**
+ * Determines if the scheme is a special scheme.
+ *
+ * @param scheme - a scheme
+ */
+export declare function isSpecialScheme(scheme: string): boolean;
+/**
+ * Determines if the URL has a special scheme.
+ *
+ * @param url - an URL
+ */
+export declare function isSpecial(url: URLRecord): boolean;
+/**
+ * Returns the default port for a special scheme.
+ *
+ * @param scheme - a scheme
+ */
+export declare function defaultPort(scheme: string): number | null;
+/**
+ * Determines if the URL has credentials.
+ *
+ * @param url - an URL
+ */
+export declare function includesCredentials(url: URLRecord): boolean;
+/**
+ * Determines if an URL cannot have credentials.
+ *
+ * @param url - an URL
+ */
+export declare function cannotHaveAUsernamePasswordPort(url: URLRecord): boolean;
+/**
+ * Serializes an URL into a string.
+ *
+ * @param url - an URL
+ */
+export declare function urlSerializer(url: URLRecord, excludeFragmentFlag?: boolean): string;
+/**
+ * Serializes a host into a string.
+ *
+ * @param host - a host
+ */
+export declare function hostSerializer(host: Host): string;
+/**
+ * Serializes an IPv4 address into a string.
+ *
+ * @param address - an IPv4 address
+ */
+export declare function iPv4Serializer(address: number): string;
+/**
+ * Serializes an IPv6 address into a string.
+ *
+ * @param address - an IPv6 address represented as a list of eight numbers
+ */
+export declare function iPv6Serializer(address: number[]): string;
+/**
+ * Parses an URL string.
+ *
+ * @param input - input string
+ * @param baseURL - base URL
+ * @param encodingOverride - encoding override
+ */
+export declare function urlParser(input: string, baseURL?: URLRecord, encodingOverride?: string): URLRecord | null;
+/**
+ * Parses an URL string.
+ *
+ * @param input - input string
+ * @param baseURL - base URL
+ * @param encodingOverride - encoding override
+ */
+export declare function basicURLParser(input: string, baseURL?: URLRecord | null, encodingOverride?: string, url?: URLRecord, stateOverride?: ParserState): URLRecord | null;
+/**
+ * Sets a URL's username.
+ *
+ * @param url - a URL
+ * @param username - username string
+ */
+export declare function setTheUsername(url: URLRecord, username: string): void;
+/**
+ * Sets a URL's password.
+ *
+ * @param url - a URL
+ * @param username - password string
+ */
+export declare function setThePassword(url: URLRecord, password: string): void;
+/**
+ * Determines if the string represents a single dot path.
+ *
+ * @param str - a string
+ */
+export declare function isSingleDotPathSegment(str: string): boolean;
+/**
+ * Determines if the string represents a double dot path.
+ *
+ * @param str - a string
+ */
+export declare function isDoubleDotPathSegment(str: string): boolean;
+/**
+ * Shorten's URL's path.
+ *
+ * @param url - an URL
+ */
+export declare function shorten(url: URLRecord): void;
+/**
+ * Determines if a string is a normalized Windows drive letter.
+ *
+ * @param str - a string
+ */
+export declare function isNormalizedWindowsDriveLetter(str: string): boolean;
+/**
+ * Determines if a string is a Windows drive letter.
+ *
+ * @param str - a string
+ */
+export declare function isWindowsDriveLetter(str: string): boolean;
+/**
+ * Determines if a string starts with a Windows drive letter.
+ *
+ * @param str - a string
+ */
+export declare function startsWithAWindowsDriveLetter(str: string): boolean;
+/**
+ * Parses a host string.
+ *
+ * @param input - input string
+ * @param isNotSpecial - `true` if the source URL is not special; otherwise
+ * `false`.
+ */
+export declare function hostParser(input: string, isNotSpecial?: boolean): string | number | number[] | null;
+/**
+ * Parses a string containing an IP v4 address.
+ *
+ * @param input - input string
+ * @param isNotSpecial - `true` if the source URL is not special; otherwise
+ * `false`.
+ */
+export declare function iPv4NumberParser(input: string, validationErrorFlag?: {
+ value: boolean;
+}): number | null;
+/**
+ * Parses a string containing an IP v4 address.
+ *
+ * @param input - input string
+ */
+export declare function iPv4Parser(input: string): string | number | null;
+/**
+ * Parses a string containing an IP v6 address.
+ *
+ * @param input - input string
+ */
+export declare function iPv6Parser(input: string): number[] | null;
+/**
+ * Parses an opaque host string.
+ *
+ * @param input - a string
+ */
+export declare function opaqueHostParser(input: string): string | null;
+/**
+ * Resolves a Blob URL from the user agent's Blob URL store.
+ * function is not implemented.
+ * See: https://w3c.github.io/FileAPI/#blob-url-resolve
+ *
+ * @param url - an url
+ */
+export declare function resolveABlobURL(url: URLRecord): any;
+/**
+ * Percent encodes a byte.
+ *
+ * @param value - a byte
+ */
+export declare function percentEncode(value: number): string;
+/**
+ * Percent decodes a byte sequence input.
+ *
+ * @param input - a byte sequence
+ */
+export declare function percentDecode(input: Uint8Array): Uint8Array;
+/**
+ * String percent decodes a string.
+ *
+ * @param input - a string
+ */
+export declare function stringPercentDecode(input: string): Uint8Array;
+/**
+ * UTF-8 percent encodes a code point, using a percent encode set.
+ *
+ * @param codePoint - a code point
+ * @param percentEncodeSet - a percent encode set
+ */
+export declare function utf8PercentEncode(codePoint: string, percentEncodeSet: RegExp): string;
+/**
+ * Determines if two hosts are considered equal.
+ *
+ * @param hostA - a host
+ * @param hostB - a host
+ */
+export declare function hostEquals(hostA: Host, hostB: Host): boolean;
+/**
+ * Determines if two URLs are considered equal.
+ *
+ * @param urlA - a URL
+ * @param urlB - a URL
+ * @param excludeFragmentsFlag - whether to ignore fragments while comparing
+ */
+export declare function urlEquals(urlA: URLRecord, urlB: URLRecord, excludeFragmentsFlag?: boolean): boolean;
+/**
+ * Parses an `application/x-www-form-urlencoded` string.
+ *
+ * @param input - a string
+ */
+export declare function urlEncodedStringParser(input: string): [string, string][];
+/**
+ * Parses `application/x-www-form-urlencoded` bytes.
+ *
+ * @param input - a byte sequence
+ */
+export declare function urlEncodedParser(input: Uint8Array): [string, string][];
+/**
+ * Serializes `application/x-www-form-urlencoded` bytes.
+ *
+ * @param input - a byte sequence
+ */
+export declare function urlEncodedByteSerializer(input: Uint8Array): string;
+/**
+ * Serializes `application/x-www-form-urlencoded` tuples.
+ *
+ * @param input - input tuple of name/value pairs
+ * @param encodingOverride: encoding override
+ */
+export declare function urlEncodedSerializer(tuples: [string, string][], encodingOverride?: string): string;
+/**
+ * Returns a URL's origin.
+ *
+ * @param url - a URL
+ */
+export declare function origin(url: URLRecord): Origin;
+/**
+ * Converts a domain string to ASCII.
+ *
+ * @param domain - a domain string
+ */
+export declare function domainToASCII(domain: string, beStrict?: boolean): string | null;
+/**
+ * Converts a domain string to Unicode.
+ *
+ * @param domain - a domain string
+ */
+export declare function domainToUnicode(domain: string, beStrict?: boolean): string;
+/**
+ * Serializes an origin.
+ * function is from the HTML spec:
+ * https://html.spec.whatwg.org/#ascii-serialisation-of-an-origin
+ *
+ * @param origin - an origin
+ */
+export declare function asciiSerializationOfAnOrigin(origin: Origin): string;
diff --git a/node_modules/@oozcitak/url/lib/URLAlgorithm.js b/node_modules/@oozcitak/url/lib/URLAlgorithm.js
new file mode 100644
index 0000000..366f4ba
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/URLAlgorithm.js
@@ -0,0 +1,2758 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+var __read = (this && this.__read) || function (o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m) return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
+ }
+ catch (error) { e = { error: error }; }
+ finally {
+ try {
+ if (r && !r.done && (m = i["return"])) m.call(i);
+ }
+ finally { if (e) throw e.error; }
+ }
+ return ar;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("@oozcitak/util");
+var interfaces_1 = require("./interfaces");
+var infra_1 = require("@oozcitak/infra");
+var url_1 = require("url");
+var _validationErrorCallback;
+/**
+ * Default ports for a special URL scheme.
+ */
+var _defaultPorts = {
+ "ftp": 21,
+ "file": null,
+ "http": 80,
+ "https": 443,
+ "ws": 80,
+ "wss": 443
+};
+/**
+ * The C0 control percent-encode set are the C0 controls and all code points
+ * greater than U+007E (~).
+ */
+var _c0ControlPercentEncodeSet = /[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
+/**
+ * The fragment percent-encode set is the C0 control percent-encode set and
+ * U+0020 SPACE, U+0022 ("), U+003C (<), U+003E (>), and U+0060 (`).
+ */
+var _fragmentPercentEncodeSet = /[ "<>`]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
+/**
+ * The path percent-encode set is the fragment percent-encode set and
+ * U+0023 (#), U+003F (?), U+007B ({), and U+007D (}).
+ */
+var _pathPercentEncodeSet = /[ "<>`#?{}]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
+/**
+ * The userinfo percent-encode set is the path percent-encode set and
+ * U+002F (/), U+003A (:), U+003B (;), U+003D (=), U+0040 (@), U+005B ([),
+ * U+005C (\), U+005D (]), U+005E (^), and U+007C (|).
+ */
+var _userInfoPercentEncodeSet = /[ "<>`#?{}/:;=@\[\]\\\^\|]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
+/**
+ * The URL code points are ASCII alphanumeric, U+0021 (!), U+0024 ($),
+ * U+0026 (&), U+0027 ('), U+0028 LEFT PARENTHESIS, U+0029 RIGHT PARENTHESIS,
+ * U+002A (*), U+002B (+), U+002C (,), U+002D (-), U+002E (.), U+002F (/),
+ * U+003A (:), U+003B (;), U+003D (=), U+003F (?), U+0040 (@), U+005F (_),
+ * U+007E (~), and code points in the range U+00A0 to U+10FFFD, inclusive,
+ * excluding surrogates and noncharacters.
+ */
+var _urlCodePoints = /[0-9A-Za-z!\$&-\/:;=\?@_~\xA0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB40-\uDB7E\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDC00-\uDFFD]/;
+/**
+ * A forbidden host code point is U+0000 NULL, U+0009 TAB, U+000A LF,
+ * U+000D CR, U+0020 SPACE, U+0023 (#), U+0025 (%), U+002F (/), U+003A (:),
+ * U+003F (?), U+0040 (@), U+005B ([), U+005C (\), or U+005D (]).
+ */
+var _forbiddenHostCodePoint = /[\0\t\f\r #%/:?@\[\\\]]/;
+/**
+ * Sets the callback function for validation errors.
+ *
+ * @param validationErrorCallback - a callback function to be called when a
+ * validation error occurs
+ */
+function setValidationErrorCallback(validationErrorCallback) {
+ _validationErrorCallback = validationErrorCallback;
+}
+exports.setValidationErrorCallback = setValidationErrorCallback;
+/**
+ * Generates a validation error.
+ *
+ * @param message - error message
+ */
+function validationError(message) {
+ if (_validationErrorCallback !== undefined) {
+ _validationErrorCallback.call(null, "Validation Error: " + message);
+ }
+}
+/**
+ * Creates a new URL.
+ */
+function newURL() {
+ return {
+ scheme: '',
+ username: '',
+ password: '',
+ host: null,
+ port: null,
+ path: [],
+ query: null,
+ fragment: null,
+ _cannotBeABaseURLFlag: false,
+ _blobURLEntry: null
+ };
+}
+exports.newURL = newURL;
+/**
+ * Determines if the scheme is a special scheme.
+ *
+ * @param scheme - a scheme
+ */
+function isSpecialScheme(scheme) {
+ return (scheme in _defaultPorts);
+}
+exports.isSpecialScheme = isSpecialScheme;
+/**
+ * Determines if the URL has a special scheme.
+ *
+ * @param url - an URL
+ */
+function isSpecial(url) {
+ return isSpecialScheme(url.scheme);
+}
+exports.isSpecial = isSpecial;
+/**
+ * Returns the default port for a special scheme.
+ *
+ * @param scheme - a scheme
+ */
+function defaultPort(scheme) {
+ return _defaultPorts[scheme] || null;
+}
+exports.defaultPort = defaultPort;
+/**
+ * Determines if the URL has credentials.
+ *
+ * @param url - an URL
+ */
+function includesCredentials(url) {
+ return url.username !== '' || url.password !== '';
+}
+exports.includesCredentials = includesCredentials;
+/**
+ * Determines if an URL cannot have credentials.
+ *
+ * @param url - an URL
+ */
+function cannotHaveAUsernamePasswordPort(url) {
+ /**
+ * A URL cannot have a username/password/port if its host is null or the
+ * empty string, its cannot-be-a-base-URL flag is set, or its scheme is
+ * "file".
+ */
+ return (url.host === null || url.host === "" || url._cannotBeABaseURLFlag ||
+ url.scheme === "file");
+}
+exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;
+/**
+ * Serializes an URL into a string.
+ *
+ * @param url - an URL
+ */
+function urlSerializer(url, excludeFragmentFlag) {
+ var e_1, _a;
+ if (excludeFragmentFlag === void 0) { excludeFragmentFlag = false; }
+ /**
+ * 1. Let output be url’s scheme and U+003A (:) concatenated.
+ */
+ var output = url.scheme + ':';
+ /**
+ * 2. If url’s host is non-null:
+ */
+ if (url.host !== null) {
+ /**
+ * 2.1. Append "//" to output.
+ */
+ output += '//';
+ /**
+ * 2.2. If url includes credentials, then:
+ */
+ if (includesCredentials(url)) {
+ /**
+ * 2.2.1. Append url’s username to output.
+ * 2.2.2. If url’s password is not the empty string, then append U+003A (:),
+ * followed by url’s password, to output.
+ * 2.2.3. Append U+0040 (@) to output.
+ */
+ output += url.username;
+ if (url.password !== '') {
+ output += ':' + url.password;
+ }
+ output += '@';
+ }
+ /**
+ * 2.3. Append url’s host, serialized, to output.
+ * 2.4. If url’s port is non-null, append U+003A (:) followed by url’s port,
+ * serialized, to output.
+ */
+ output += hostSerializer(url.host);
+ if (url.port !== null) {
+ output += ':' + url.port;
+ }
+ }
+ else if (url.host === null && url.scheme === "file") {
+ /**
+ * 3. Otherwise, if url’s host is null and url’s scheme is "file", append "//" to output.
+ */
+ output += '//';
+ }
+ /**
+ * 4. If url’s cannot-be-a-base-URL flag is set, append url’s path[0] to
+ * output.
+ * 5. Otherwise, then for each string in url’s path, append U+002F (/)
+ * followed by the string to output.
+ */
+ if (url._cannotBeABaseURLFlag) {
+ output += url.path[0];
+ }
+ else {
+ try {
+ for (var _b = __values(url.path), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var str = _c.value;
+ output += '/' + str;
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ }
+ /**
+ * 6. If url’s query is non-null, append U+003F (?), followed by url’s
+ * query, to output.
+ * 7. If the exclude fragment flag is unset and url’s fragment is non-null,
+ * append U+0023 (#), followed by url’s fragment, to output.
+ * 8. Return output.
+ */
+ if (url.query !== null) {
+ output += '?' + url.query;
+ }
+ if (!excludeFragmentFlag && url.fragment !== null) {
+ output += '#' + url.fragment;
+ }
+ return output;
+}
+exports.urlSerializer = urlSerializer;
+/**
+ * Serializes a host into a string.
+ *
+ * @param host - a host
+ */
+function hostSerializer(host) {
+ /**
+ * 1. If host is an IPv4 address, return the result of running the IPv4
+ * serializer on host.
+ * 2. Otherwise, if host is an IPv6 address, return U+005B ([), followed
+ * by the result of running the IPv6 serializer on host, followed by
+ * U+005D (]).
+ * 3. Otherwise, host is a domain, opaque host, or empty host, return host.
+ */
+ if (util_1.isNumber(host)) {
+ return iPv4Serializer(host);
+ }
+ else if (util_1.isArray(host)) {
+ return '[' + iPv6Serializer(host) + ']';
+ }
+ else {
+ return host;
+ }
+}
+exports.hostSerializer = hostSerializer;
+/**
+ * Serializes an IPv4 address into a string.
+ *
+ * @param address - an IPv4 address
+ */
+function iPv4Serializer(address) {
+ /**
+ * 1. Let output be the empty string.
+ * 2. Let n be the value of address.
+ * 3. For each i in the range 1 to 4, inclusive:
+ * 3.1. Prepend n % 256, serialized, to output.
+ * 3.2. If i is not 4, then prepend U+002E (.) to output.
+ * 3.3. Set n to floor(n / 256).
+ * 4. Return output.
+ */
+ var output = "";
+ var n = address;
+ for (var i = 1; i <= 4; i++) {
+ output = (n % 256).toString() + output;
+ if (i !== 4) {
+ output = '.' + output;
+ }
+ n = Math.floor(n / 256);
+ }
+ return output;
+}
+exports.iPv4Serializer = iPv4Serializer;
+/**
+ * Serializes an IPv6 address into a string.
+ *
+ * @param address - an IPv6 address represented as a list of eight numbers
+ */
+function iPv6Serializer(address) {
+ /**
+ * 1. Let output be the empty string.
+ * 2. Let compress be an index to the first IPv6 piece in the first longest
+ * sequences of address’s IPv6 pieces that are 0.
+ * In 0:f:0:0:f:f:0:0 it would point to the second 0.
+ * 3. If there is no sequence of address’s IPv6 pieces that are 0 that is
+ * longer than 1, then set compress to null.
+ */
+ var output = "";
+ var compress = null;
+ var lastIndex = -1;
+ var count = 0;
+ var lastCount = 0;
+ for (var i = 0; i < 8; i++) {
+ if (address[i] !== 0)
+ continue;
+ count = 1;
+ for (var j = i + 1; j < 8; j++) {
+ if (address[j] !== 0)
+ break;
+ count++;
+ continue;
+ }
+ if (count > lastCount) {
+ lastCount = count;
+ lastIndex = i;
+ }
+ }
+ if (lastCount > 1)
+ compress = lastIndex;
+ /**
+ * 4. Let ignore0 be false.
+ * 5. For each pieceIndex in the range 0 to 7, inclusive:
+ */
+ var ignore0 = false;
+ for (var pieceIndex = 0; pieceIndex < 8; pieceIndex++) {
+ /**
+ * 5.1. If ignore0 is true and address[pieceIndex] is 0, then continue.
+ * 5.2. Otherwise, if ignore0 is true, set ignore0 to false.
+ * 5.3. If compress is pieceIndex, then:
+ */
+ if (ignore0 && address[pieceIndex] === 0)
+ continue;
+ if (ignore0)
+ ignore0 = false;
+ if (compress === pieceIndex) {
+ /**
+ * 5.3.1. Let separator be "::" if pieceIndex is 0, and U+003A (:) otherwise.
+ * 5.3.2. Append separator to output.
+ * 5.3.3. Set ignore0 to true and continue.
+ */
+ output += (pieceIndex === 0 ? '::' : ':');
+ ignore0 = true;
+ continue;
+ }
+ /**
+ * 5.4. Append address[pieceIndex], represented as the shortest possible
+ * lowercase hexadecimal number, to output.
+ * 5.5. If pieceIndex is not 7, then append U+003A (:) to output.
+ */
+ output += address[pieceIndex].toString(16);
+ if (pieceIndex !== 7)
+ output += ':';
+ }
+ /**
+ * 6. Return output.
+ */
+ return output;
+}
+exports.iPv6Serializer = iPv6Serializer;
+/**
+ * Parses an URL string.
+ *
+ * @param input - input string
+ * @param baseURL - base URL
+ * @param encodingOverride - encoding override
+ */
+function urlParser(input, baseURL, encodingOverride) {
+ /**
+ * 1. Let url be the result of running the basic URL parser on input with
+ * base, and encoding override as provided.
+ * 2. If url is failure, return failure.
+ * 3. If url’s scheme is not "blob", return url.
+ * 4. Set url’s blob URL entry to the result of resolving the blob URL url,
+ * if that did not return failure, and null otherwise.
+ * 5. Return url.
+ */
+ var url = basicURLParser(input, baseURL, encodingOverride);
+ if (url === null)
+ return null;
+ if (url.scheme !== "blob")
+ return url;
+ var entry = resolveABlobURL(url);
+ if (entry !== null) {
+ url._blobURLEntry = entry;
+ }
+ else {
+ url._blobURLEntry = null;
+ }
+ return url;
+}
+exports.urlParser = urlParser;
+/**
+ * Parses an URL string.
+ *
+ * @param input - input string
+ * @param baseURL - base URL
+ * @param encodingOverride - encoding override
+ */
+function basicURLParser(input, baseURL, encodingOverride, url, stateOverride) {
+ var e_2, _a, e_3, _b;
+ /**
+ * 1. If url is not given:
+ * 1.1. Set url to a new URL.
+ * 1.2. If input contains any leading or trailing C0 control or space,
+ * validation error.
+ * 1.3. Remove any leading and trailing C0 control or space from input.
+ */
+ if (url === undefined) {
+ url = newURL();
+ // leading
+ var leadingControlOrSpace = /^[\u0000-\u001F\u0020]+/;
+ var trailingControlOrSpace = /[\u0000-\u001F\u0020]+$/;
+ if (leadingControlOrSpace.test(input) || trailingControlOrSpace.test(input)) {
+ validationError("Input string contains leading or trailing control characters or space.");
+ }
+ input = input.replace(leadingControlOrSpace, '');
+ input = input.replace(trailingControlOrSpace, '');
+ }
+ /**
+ * 2. If input contains any ASCII tab or newline, validation error.
+ * 3. Remove all ASCII tab or newline from input.
+ */
+ var tabOrNewline = /[\u0009\u000A\u000D]/g;
+ if (tabOrNewline.test(input)) {
+ validationError("Input string contains tab or newline characters.");
+ }
+ input = input.replace(tabOrNewline, '');
+ /**
+ * 4. Let state be state override if given, or scheme start state otherwise.
+ * 5. If base is not given, set it to null.
+ * 6. Let encoding be UTF-8.
+ * 7. If encoding override is given, set encoding to the result of getting
+ * an output encoding from encoding override.
+ */
+ var state = (stateOverride === undefined ? interfaces_1.ParserState.SchemeStart : stateOverride);
+ if (baseURL === undefined)
+ baseURL = null;
+ var encoding = (encodingOverride === undefined ||
+ encodingOverride === "replacement" || encodingOverride === "UTF-16BE" ||
+ encodingOverride === "UTF-16LE" ? "UTF-8" : encodingOverride);
+ /**
+ * 8. Let buffer be the empty string.
+ * 9. Let the @ flag, [] flag, and passwordTokenSeenFlag be unset.
+ * 10. Let pointer be a pointer to first code point in input.
+ */
+ var buffer = "";
+ var atFlag = false;
+ var arrayFlag = false;
+ var passwordTokenSeenFlag = false;
+ var EOF = "";
+ var walker = new util_1.StringWalker(input);
+ /**
+ * 11. Keep running the following state machine by switching on state. If
+ * after a run pointer points to the EOF code point, go to the next step.
+ * Otherwise, increase pointer by one and continue with the state machine.
+ */
+ while (true) {
+ switch (state) {
+ case interfaces_1.ParserState.SchemeStart:
+ /**
+ * 1. If c is an ASCII alpha, append c, lowercased, to buffer, and set
+ * state to scheme state.
+ * 2. Otherwise, if state override is not given, set state to no scheme
+ * state, and decrease pointer by one.
+ * 3. Otherwise, validation error, return failure.
+ */
+ if (infra_1.codePoint.ASCIIAlpha.test(walker.c())) {
+ buffer += walker.c().toLowerCase();
+ state = interfaces_1.ParserState.Scheme;
+ }
+ else if (stateOverride === undefined) {
+ state = interfaces_1.ParserState.NoScheme;
+ walker.pointer--;
+ }
+ else {
+ validationError("Invalid scheme start character.");
+ return null;
+ }
+ break;
+ case interfaces_1.ParserState.Scheme:
+ /**
+ * 1. If c is an ASCII alphanumeric, U+002B (+), U+002D (-), or U+002E
+ * (.), append c, lowercased, to buffer.
+ */
+ if (infra_1.codePoint.ASCIIAlphanumeric.test(walker.c()) ||
+ walker.c() === '+' || walker.c() === '-' || walker.c() === '.') {
+ buffer += walker.c().toLowerCase();
+ }
+ else if (walker.c() === ':') {
+ /**
+ * 2. Otherwise, if c is U+003A (:), then:
+ * 2.1. If state override is given, then:
+ * 2.1.1. If url’s scheme is a special scheme and buffer is not a
+ * special scheme, then return.
+ * 2.1.2. If url’s scheme is not a special scheme and buffer is a
+ * special scheme, then return.
+ * 2.1.3. If url includes credentials or has a non-null port, and
+ * buffer is "file", then return.
+ * 2.1.4. If url’s scheme is "file" and its host is an empty host or
+ * null, then return.
+ */
+ if (stateOverride !== undefined) {
+ if (isSpecialScheme(url.scheme) && !isSpecialScheme(buffer))
+ return url;
+ if (!isSpecialScheme(url.scheme) && isSpecialScheme(buffer))
+ return url;
+ if ((includesCredentials(url) || url.port !== null) && buffer === "file")
+ return url;
+ if (url.scheme === "file" && (url.host === "" || url.host === null))
+ return url;
+ }
+ /**
+ * 2.2. Set url’s scheme to buffer.
+ */
+ url.scheme = buffer;
+ /**
+ * 2.3. If state override is given, then:
+ * 2.3.1. If url’s port is url’s scheme’s default port, then set
+ * url’s port to null.
+ * 2.3.2. Return.
+ */
+ if (stateOverride !== undefined) {
+ if (url.port === defaultPort(url.scheme)) {
+ url.port = null;
+ }
+ return url;
+ }
+ /**
+ * 2.4. Set buffer to the empty string.
+ */
+ buffer = "";
+ if (url.scheme === "file") {
+ /**
+ * 2.5. If url’s scheme is "file", then:
+ * 2.5.1. If remaining does not start with "//", validation error.
+ * 2.5.2. Set state to file state.
+ */
+ if (!walker.remaining().startsWith("//")) {
+ validationError("Invalid file URL scheme, '//' expected.");
+ }
+ state = interfaces_1.ParserState.File;
+ }
+ else if (isSpecial(url) && baseURL !== null && baseURL.scheme === url.scheme) {
+ /**
+ * 2.6. Otherwise, if url is special, base is non-null, and base’s
+ * scheme is equal to url’s scheme, set state to special relative
+ * or authority state.
+ */
+ state = interfaces_1.ParserState.SpecialRelativeOrAuthority;
+ }
+ else if (isSpecial(url)) {
+ /**
+ * 2.7. Otherwise, if url is special, set state to special
+ * authority slashes state.
+ */
+ state = interfaces_1.ParserState.SpecialAuthoritySlashes;
+ }
+ else if (walker.remaining().startsWith("/")) {
+ /**
+ * 2.8. Otherwise, if remaining starts with an U+002F (/), set state
+ * to path or authority state and increase pointer by one.
+ */
+ state = interfaces_1.ParserState.PathOrAuthority;
+ walker.pointer++;
+ }
+ else {
+ /**
+ * 2.9. Otherwise, set url’s cannot-be-a-base-URL flag, append an
+ * empty string to url’s path, and set state to
+ * cannot-be-a-base-URL path state.
+ */
+ url._cannotBeABaseURLFlag = true;
+ url.path.push("");
+ state = interfaces_1.ParserState.CannotBeABaseURLPath;
+ }
+ }
+ else if (stateOverride === undefined) {
+ /**
+ * 3. Otherwise, if state override is not given, set buffer to the
+ * empty string, state to no scheme state, and start over (from the
+ * first code point in input).
+ */
+ buffer = "";
+ state = interfaces_1.ParserState.NoScheme;
+ walker.pointer = 0;
+ continue;
+ }
+ else {
+ /**
+ * 4. Otherwise, validation error, return failure.
+ */
+ validationError("Invalid input string.");
+ return null;
+ }
+ break;
+ case interfaces_1.ParserState.NoScheme:
+ /**
+ * 1. If base is null, or base’s cannot-be-a-base-URL flag is set
+ * and c is not U+0023 (#), validation error, return failure.
+ * 2. Otherwise, if base’s cannot-be-a-base-URL flag is set and
+ * c is U+0023 (#), set url’s scheme to base’s scheme, url’s path to
+ * a copy of base’s path, url’s query to base’s query, url’s
+ * fragment to the empty string, set url’s cannot-be-a-base-URL
+ * flag, and set state to fragment state.
+ * 3. Otherwise, if base’s scheme is not "file", set state to
+ * relative state and decrease pointer by one.
+ * 4. Otherwise, set state to file state and decrease pointer by one.
+ */
+ if (baseURL === null || (baseURL._cannotBeABaseURLFlag && walker.c() !== '#')) {
+ validationError("Invalid input string.");
+ return null;
+ }
+ else if (baseURL._cannotBeABaseURLFlag && walker.c() === '#') {
+ url.scheme = baseURL.scheme;
+ url.path = infra_1.list.clone(baseURL.path);
+ url.query = baseURL.query;
+ url.fragment = "";
+ url._cannotBeABaseURLFlag = true;
+ state = interfaces_1.ParserState.Fragment;
+ }
+ else if (baseURL.scheme !== "file") {
+ state = interfaces_1.ParserState.Relative;
+ walker.pointer--;
+ }
+ else {
+ state = interfaces_1.ParserState.File;
+ walker.pointer--;
+ }
+ break;
+ case interfaces_1.ParserState.SpecialRelativeOrAuthority:
+ /**
+ * If c is U+002F (/) and remaining starts with U+002F (/), then set
+ * state to special authority ignore slashes state and increase
+ * pointer by one.
+ * Otherwise, validation error, set state to relative state and
+ * decrease pointer by one.
+ */
+ if (walker.c() === '/' && walker.remaining().startsWith('/')) {
+ state = interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes;
+ walker.pointer++;
+ }
+ else {
+ validationError("Invalid input string.");
+ state = interfaces_1.ParserState.Relative;
+ walker.pointer--;
+ }
+ break;
+ case interfaces_1.ParserState.PathOrAuthority:
+ /**
+ * If c is U+002F (/), then set state to authority state.
+ * Otherwise, set state to path state, and decrease pointer by one.
+ */
+ if (walker.c() === '/') {
+ state = interfaces_1.ParserState.Authority;
+ }
+ else {
+ state = interfaces_1.ParserState.Path;
+ walker.pointer--;
+ }
+ break;
+ case interfaces_1.ParserState.Relative:
+ /**
+ * Set url’s scheme to base’s scheme, and then, switching on c:
+ */
+ if (baseURL === null) {
+ throw new Error("Invalid parser state. Base URL is null.");
+ }
+ url.scheme = baseURL.scheme;
+ switch (walker.c()) {
+ case EOF: // EOF
+ /**
+ * Set url’s username to base’s username, url’s password to base’s
+ * password, url’s host to base’s host, url’s port to base’s port,
+ * url’s path to a copy of base’s path, and url’s query to base’s
+ * query.
+ */
+ url.username = baseURL.username;
+ url.password = baseURL.password;
+ url.host = baseURL.host;
+ url.port = baseURL.port;
+ url.path = infra_1.list.clone(baseURL.path);
+ url.query = baseURL.query;
+ break;
+ case '/':
+ /**
+ * Set state to relative slash state.
+ */
+ state = interfaces_1.ParserState.RelativeSlash;
+ break;
+ case '?':
+ /**
+ * Set url’s username to base’s username, url’s password to base’s
+ * password, url’s host to base’s host, url’s port to base’s port,
+ * url’s path to a copy of base’s path, url’s query to the empty
+ * string, and state to query state.
+ */
+ url.username = baseURL.username;
+ url.password = baseURL.password;
+ url.host = baseURL.host;
+ url.port = baseURL.port;
+ url.path = infra_1.list.clone(baseURL.path);
+ url.query = "";
+ state = interfaces_1.ParserState.Query;
+ break;
+ case '#':
+ /**
+ * Set url’s username to base’s username, url’s password to base’s
+ * password, url’s host to base’s host, url’s port to base’s port,
+ * url’s path to a copy of base’s path, url’s query to base’s
+ * query, url’s fragment to the empty string, and state to
+ * fragment state.
+ */
+ url.username = baseURL.username;
+ url.password = baseURL.password;
+ url.host = baseURL.host;
+ url.port = baseURL.port;
+ url.path = infra_1.list.clone(baseURL.path);
+ url.query = baseURL.query;
+ url.fragment = "";
+ state = interfaces_1.ParserState.Fragment;
+ break;
+ default:
+ /**
+ * If url is special and c is U+005C (\), validation error,
+ * set state to relative slash state.
+ * Otherwise, run these steps:
+ * 1. Set url’s username to base’s username, url’s password to
+ * base’s password, url’s host to base’s host, url’s port to
+ * base’s port, url’s path to a copy of base’s path, and then
+ * remove url’s path’s last item, if any.
+ * 2. Set state to path state, and decrease pointer by one.
+ */
+ if (isSpecial(url) && walker.c() === '\\') {
+ validationError("Invalid input string.");
+ state = interfaces_1.ParserState.RelativeSlash;
+ }
+ else {
+ url.username = baseURL.username;
+ url.password = baseURL.password;
+ url.host = baseURL.host;
+ url.port = baseURL.port;
+ url.path = infra_1.list.clone(baseURL.path);
+ if (url.path.length !== 0)
+ url.path.splice(url.path.length - 1, 1);
+ state = interfaces_1.ParserState.Path;
+ walker.pointer--;
+ }
+ break;
+ }
+ break;
+ case interfaces_1.ParserState.RelativeSlash:
+ /**
+ * 1. If url is special and c is U+002F (/) or U+005C (\), then:
+ * 1.1. If c is U+005C (\), validation error.
+ * 1.2. Set state to special authority ignore slashes state.
+ * 2. Otherwise, if c is U+002F (/), then set state to authority state.
+ * 3. Otherwise, set url’s username to base’s username, url’s password
+ * to base’s password, url’s host to base’s host, url’s port to base’s
+ * port, state to path state, and then, decrease pointer by one.
+ */
+ if (isSpecial(url) && (walker.c() === '/' || walker.c() === '\\')) {
+ if (walker.c() === '\\') {
+ validationError("Invalid input string.");
+ }
+ state = interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes;
+ }
+ else if (walker.c() === '/') {
+ state = interfaces_1.ParserState.Authority;
+ }
+ else {
+ if (baseURL === null) {
+ throw new Error("Invalid parser state. Base URL is null.");
+ }
+ url.username = baseURL.username;
+ url.password = baseURL.password;
+ url.host = baseURL.host;
+ url.port = baseURL.port;
+ state = interfaces_1.ParserState.Path;
+ walker.pointer--;
+ }
+ break;
+ case interfaces_1.ParserState.SpecialAuthoritySlashes:
+ /**
+ * If c is U+002F (/) and remaining starts with U+002F (/), then set
+ * state to special authority ignore slashes state and increase
+ * pointer by one.
+ * Otherwise, validation error, set state to special authority ignore
+ * slashes state, and decrease pointer by one.
+ */
+ if (walker.c() === '/' && walker.remaining().startsWith('/')) {
+ state = interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes;
+ walker.pointer++;
+ }
+ else {
+ validationError("Expected '//'.");
+ state = interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes;
+ walker.pointer--;
+ }
+ break;
+ case interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes:
+ /**
+ * If c is neither U+002F (/) nor U+005C (\), then set state to
+ * authority state and decrease pointer by one.
+ * Otherwise, validation error.
+ */
+ if (walker.c() !== '/' && walker.c() !== '\\') {
+ state = interfaces_1.ParserState.Authority;
+ walker.pointer--;
+ }
+ else {
+ validationError("Unexpected '/' or '\\'.");
+ }
+ break;
+ case interfaces_1.ParserState.Authority:
+ /**
+ * 1. If c is U+0040 (@), then:
+ */
+ if (walker.c() === '@') {
+ /**
+ * 1.1. Validation error.
+ * 1.2. If the @ flag is set, prepend "%40" to buffer.
+ * 1.3. Set the @ flag.
+ * 1.4. For each codePoint in buffer:
+ */
+ validationError("Unexpected '@'.");
+ if (atFlag)
+ buffer = '%40' + buffer;
+ atFlag = true;
+ try {
+ for (var buffer_1 = (e_2 = void 0, __values(buffer)), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) {
+ var codePoint = buffer_1_1.value;
+ /**
+ * 1.4.1. If codePoint is U+003A (:) and passwordTokenSeenFlag is
+ * unset, then set passwordTokenSeenFlag and continue.
+ * 1.4.2. Let encodedCodePoints be the result of running UTF-8
+ * percent encode codePoint using the userinfo percent-encode set.
+ * 1.4.3. If passwordTokenSeenFlag is set, then append
+ * encodedCodePoints to url’s password.
+ * 1.4.4. Otherwise, append encodedCodePoints to url’s username.
+ */
+ if (codePoint === ':' && !passwordTokenSeenFlag) {
+ passwordTokenSeenFlag = true;
+ continue;
+ }
+ var encodedCodePoints = utf8PercentEncode(codePoint, _userInfoPercentEncodeSet);
+ if (passwordTokenSeenFlag) {
+ url.password += encodedCodePoints;
+ }
+ else {
+ url.username += encodedCodePoints;
+ }
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ /**
+ * 1.5. Set buffer to the empty string.
+ */
+ buffer = "";
+ }
+ else if (walker.c() === EOF || walker.c() === '/' || walker.c() === '?' || walker.c() === '#' ||
+ (isSpecial(url) && walker.c() === '\\')) {
+ /**
+ * 2. Otherwise, if one of the following is true
+ * - c is the EOF code point, U+002F (/), U+003F (?), or U+0023 (#)
+ * - url is special and c is U+005C (\)
+ * then:
+ * 2.1. If @ flag is set and buffer is the empty string, validation
+ * error, return failure.
+ * 2.2. Decrease pointer by the number of code points in buffer plus
+ * one, set buffer to the empty string, and set state to host state.
+ */
+ if (atFlag && buffer === "") {
+ validationError("Invalid input string.");
+ return null;
+ }
+ walker.pointer -= (buffer.length + 1);
+ buffer = "";
+ state = interfaces_1.ParserState.Host;
+ }
+ else {
+ /**
+ * 3. Otherwise, append c to buffer.
+ */
+ buffer += walker.c();
+ }
+ break;
+ case interfaces_1.ParserState.Host:
+ case interfaces_1.ParserState.Hostname:
+ if (stateOverride !== undefined && url.scheme === "file") {
+ /**
+ * 1. If state override is given and url’s scheme is "file", then
+ * decrease pointer by one and set state to file host state.
+ */
+ walker.pointer--;
+ state = interfaces_1.ParserState.FileHost;
+ }
+ else if (walker.c() === ':' && !arrayFlag) {
+ /**
+ * 2. Otherwise, if c is U+003A (:) and the [] flag is unset, then:
+ * 2.1. If buffer is the empty string, validation error, return
+ * failure.
+ * 2.2. Let host be the result of host parsing buffer with url is
+ * not special.
+ * 2.3. If host is failure, then return failure.
+ * 2.4. Set url’s host to host, buffer to the empty string, and
+ * state to port state.
+ * 2.5. If state override is given and state override is hostname
+ * state, then return.
+ */
+ if (buffer === "") {
+ validationError("Invalid input string.");
+ return null;
+ }
+ var host = hostParser(buffer, !isSpecial(url));
+ if (host === null)
+ return null;
+ url.host = host;
+ buffer = "";
+ state = interfaces_1.ParserState.Port;
+ if (stateOverride === interfaces_1.ParserState.Hostname)
+ return url;
+ }
+ else if (walker.c() === EOF || walker.c() === '/' || walker.c() === '?' || walker.c() === '#' ||
+ (isSpecial(url) && walker.c() === '\\')) {
+ /**
+ * 3. Otherwise, if one of the following is true
+ * - c is the EOF code point, U+002F (/), U+003F (?), or U+0023 (#)
+ * - url is special and c is U+005C (\)
+ * then decrease pointer by one, and then:
+ * 3.1. If url is special and buffer is the empty string, validation
+ * error, return failure.
+ * 3.2. Otherwise, if state override is given, buffer is the empty
+ * string, and either url includes credentials or url’s port is
+ * non-null, validation error, return.
+ * 3.3. Let host be the result of host parsing buffer with url is
+ * not special.
+ * 3.4. If host is failure, then return failure.
+ * 3.5. Set url’s host to host, buffer to the empty string, and
+ * state to path start state.
+ * 3.6. If state override is given, then return.
+ */
+ walker.pointer--;
+ if (isSpecial(url) && buffer === "") {
+ validationError("Invalid input string.");
+ return null;
+ }
+ else if (stateOverride !== undefined && buffer === "" &&
+ (includesCredentials(url) || url.port !== null)) {
+ validationError("Invalid input string.");
+ return url;
+ }
+ var host = hostParser(buffer, !isSpecial(url));
+ if (host === null)
+ return null;
+ url.host = host;
+ buffer = "";
+ state = interfaces_1.ParserState.PathStart;
+ if (stateOverride !== undefined)
+ return url;
+ }
+ else {
+ /**
+ * 4. Otherwise:
+ * 4.1. If c is U+005B ([), then set the [] flag.
+ * 4.2. If c is U+005D (]), then unset the [] flag.
+ * 4.3. Append c to buffer.
+ */
+ if (walker.c() === '[')
+ arrayFlag = true;
+ if (walker.c() === ']')
+ arrayFlag = false;
+ buffer += walker.c();
+ }
+ break;
+ case interfaces_1.ParserState.Port:
+ if (infra_1.codePoint.ASCIIDigit.test(walker.c())) {
+ /**
+ * 1. If c is an ASCII digit, append c to buffer.
+ */
+ buffer += walker.c();
+ }
+ else if (walker.c() === EOF || walker.c() === '/' || walker.c() === '?' || walker.c() === '#' ||
+ (isSpecial(url) && walker.c() === '\\') || stateOverride) {
+ /**
+ * 2. Otherwise, if one of the following is true
+ * - c is the EOF code point, U+002F (/), U+003F (?), or U+0023 (#)
+ * - url is special and c is U+005C (\)
+ * - state override is given
+ * then:
+ */
+ if (buffer !== "") {
+ /**
+ * 2.1. If buffer is not the empty string, then:
+ * 2.1.1. Let port be the mathematical integer value that is
+ * represented by buffer in radix-10 using ASCII digits for digits
+ * with values 0 through 9.
+ * 2.1.2. If port is greater than 2**16 − 1, validation error,
+ * return failure.
+ * 2.1.3. Set url’s port to null, if port is url’s scheme’s default
+ * port, and to port otherwise.
+ * 2.1.4. Set buffer to the empty string.
+ */
+ if (buffer !== "") {
+ var port = parseInt(buffer, 10);
+ if (port > Math.pow(2, 16) - 1) {
+ validationError("Invalid port number.");
+ return null;
+ }
+ url.port = (port === defaultPort(url.scheme) ? null : port);
+ buffer = "";
+ }
+ }
+ /**
+ * 2.2. If state override is given, then return.
+ * 2.3. Set state to path start state, and decrease pointer by one.
+ */
+ if (stateOverride !== undefined) {
+ return url;
+ }
+ state = interfaces_1.ParserState.PathStart;
+ walker.pointer--;
+ }
+ else {
+ /**
+ * 3. Otherwise, validation error, return failure.
+ */
+ validationError("Invalid input string.");
+ return null;
+ }
+ break;
+ case interfaces_1.ParserState.File:
+ /**
+ * 1. Set url’s scheme to "file".
+ */
+ url.scheme = "file";
+ if (walker.c() === '/' || walker.c() === '\\') {
+ /**
+ * 2. If c is U+002F (/) or U+005C (\), then:
+ * 2.1. If c is U+005C (\), validation error.
+ * 2.2. Set state to file slash state.
+ */
+ if (walker.c() === '\\') {
+ validationError("Invalid input string.");
+ }
+ state = interfaces_1.ParserState.FileSlash;
+ }
+ else if (baseURL !== null && baseURL.scheme === "file") {
+ /**
+ * 3. Otherwise, if base is non-null and base’s scheme is "file",
+ * switch on c:
+ */
+ switch (walker.c()) {
+ case EOF:
+ /**
+ * Set url’s host to base’s host, url’s path to a copy of base’s
+ * path, and url’s query to base’s query.
+ */
+ url.host = baseURL.host;
+ url.path = infra_1.list.clone(baseURL.path);
+ url.query = baseURL.query;
+ break;
+ case '?':
+ /**
+ * Set url’s host to base’s host, url’s path to a copy of base’s
+ * path, url’s query to the empty string, and state to query
+ * state.
+ */
+ url.host = baseURL.host;
+ url.path = infra_1.list.clone(baseURL.path);
+ url.query = "";
+ state = interfaces_1.ParserState.Query;
+ break;
+ case '#':
+ /**
+ * Set url’s host to base’s host, url’s path to a copy of base’s
+ * path, url’s query to base’s query, url’s fragment to the
+ * empty string, and state to fragment state.
+ */
+ url.host = baseURL.host;
+ url.path = infra_1.list.clone(baseURL.path);
+ url.query = baseURL.query;
+ url.fragment = "";
+ state = interfaces_1.ParserState.Fragment;
+ break;
+ default:
+ /**
+ * 1. If the substring from pointer in input does not start
+ * with a Windows drive letter, then set url’s host to base’s
+ * host, url’s path to a copy of base’s path, and then shorten
+ * url’s path.
+ * _Note:_ is a (platform-independent) Windows drive letter
+ * quirk.
+ * 2. Otherwise, validation error.
+ * 3. Set state to path state, and decrease pointer by one.
+ */
+ if (!startsWithAWindowsDriveLetter(walker.substring())) {
+ url.host = baseURL.host;
+ url.path = infra_1.list.clone(baseURL.path);
+ shorten(url);
+ }
+ else {
+ validationError("Unexpected windows drive letter in input string.");
+ }
+ state = interfaces_1.ParserState.Path;
+ walker.pointer--;
+ break;
+ }
+ }
+ else {
+ /**
+ * 4. Otherwise, set state to path state, and decrease pointer by
+ * one.
+ */
+ state = interfaces_1.ParserState.Path;
+ walker.pointer--;
+ }
+ break;
+ case interfaces_1.ParserState.FileSlash:
+ if (walker.c() === '/' || walker.c() === '\\') {
+ /**
+ * 1. If c is U+002F (/) or U+005C (\), then:
+ * 1.1. If c is U+005C (\), validation error.
+ * 1.2. Set state to file host state.
+ */
+ if (walker.c() === '\\') {
+ validationError("Invalid input string.");
+ }
+ state = interfaces_1.ParserState.FileHost;
+ }
+ else {
+ /**
+ * 2. Otherwise:
+ * 2.1. If base is non-null, base’s scheme is "file", and the
+ * substring from pointer in input does not start with a Windows
+ * drive letter, then:
+ * 2.1.1. If base’s path[0] is a normalized Windows drive letter,
+ * then append base’s path[0] to url’s path.
+ * _Note:_ is a (platform-independent) Windows drive letter
+ * quirk. Both url’s and base’s host are null under these conditions
+ * and therefore not copied.
+ * 2.1.2. Otherwise, set url’s host to base’s host.
+ * 2.2. Set state to path state, and decrease pointer by one.
+ */
+ if (baseURL !== null && baseURL.scheme === "file" &&
+ !startsWithAWindowsDriveLetter(walker.substring())) {
+ if (isNormalizedWindowsDriveLetter(baseURL.path[0])) {
+ url.path.push(baseURL.path[0]);
+ }
+ else {
+ url.host = baseURL.host;
+ }
+ }
+ state = interfaces_1.ParserState.Path;
+ walker.pointer--;
+ }
+ break;
+ case interfaces_1.ParserState.FileHost:
+ if (walker.c() === EOF || walker.c() === '/' || walker.c() === '\\' ||
+ walker.c() === '?' || walker.c() === '#') {
+ /**
+ * 1. If c is the EOF code point, U+002F (/), U+005C (\), U+003F (?),
+ * or U+0023 (#), then decrease pointer by one and then:
+ */
+ walker.pointer--;
+ if (stateOverride === undefined && isWindowsDriveLetter(buffer)) {
+ /**
+ * 1.1. If state override is not given and buffer is a Windows drive
+ * letter, validation error, set state to path state.
+ * _Note:_ is a (platform-independent) Windows drive letter
+ * quirk. buffer is not reset here and instead used in the path state.
+ */
+ validationError("Unexpected windows drive letter in input string.");
+ state = interfaces_1.ParserState.Path;
+ }
+ else if (buffer === "") {
+ /**
+ * 1.2. Otherwise, if buffer is the empty string, then:
+ * 1.2.1. Set url’s host to the empty string.
+ * 1.2.2. If state override is given, then return.
+ * 1.2.3. Set state to path start state.
+ */
+ url.host = "";
+ if (stateOverride !== undefined)
+ return url;
+ state = interfaces_1.ParserState.PathStart;
+ }
+ else {
+ /**
+ * 1.3. Otherwise, run these steps:
+ * 1.3.1. Let host be the result of host parsing buffer with url
+ * is not special.
+ * 1.3.2. If host is failure, then return failure.
+ * 1.3.3. If host is "localhost", then set host to the empty
+ * string.
+ * 1.3.4. Set url’s host to host.
+ * 1.3.5. If state override is given, then return.
+ * 1.3.6. Set buffer to the empty string and state to path start
+ * state.
+ */
+ var host = hostParser(buffer, !isSpecial(url));
+ if (host === null)
+ return null;
+ if (host === "localhost")
+ host = "";
+ url.host = host;
+ if (stateOverride !== undefined)
+ return url;
+ buffer = "";
+ state = interfaces_1.ParserState.PathStart;
+ }
+ }
+ else {
+ /**
+ * 2. Otherwise, append c to buffer.
+ */
+ buffer += walker.c();
+ }
+ break;
+ case interfaces_1.ParserState.PathStart:
+ if (isSpecial(url)) {
+ /**
+ * 1. If url is special, then:
+ * 1.1. If c is U+005C (\), validation error.
+ * 1.2. Set state to path state.
+ * 1.3. If c is neither U+002F (/) nor U+005C (\), then decrease
+ * pointer by one.
+ */
+ if (walker.c() === '\\') {
+ validationError("Invalid input string.");
+ }
+ state = interfaces_1.ParserState.Path;
+ if (walker.c() !== '/' && walker.c() !== '\\')
+ walker.pointer--;
+ }
+ else if (stateOverride === undefined && walker.c() === '?') {
+ /**
+ * 2. Otherwise, if state override is not given and c is U+003F (?),
+ * set url’s query to the empty string and state to query state.
+ */
+ url.query = "";
+ state = interfaces_1.ParserState.Query;
+ }
+ else if (stateOverride === undefined && walker.c() === '#') {
+ /**
+ * 3. Otherwise, if state override is not given and c is U+0023 (#),
+ * set url’s fragment to the empty string and state to fragment
+ * state.
+ */
+ url.fragment = "";
+ state = interfaces_1.ParserState.Fragment;
+ }
+ else if (walker.c() !== EOF) {
+ /**
+ * 4. Otherwise, if c is not the EOF code point:
+ * 4.1. Set state to path state.
+ * 4.2. If c is not U+002F (/), then decrease pointer by one.
+ */
+ state = interfaces_1.ParserState.Path;
+ if (walker.c() !== '/')
+ walker.pointer--;
+ }
+ break;
+ case interfaces_1.ParserState.Path:
+ if ((walker.c() === EOF || walker.c() === '/') ||
+ (isSpecial(url) && walker.c() === '\\') ||
+ (stateOverride === undefined && (walker.c() === '?' || walker.c() === '#'))) {
+ /**
+ * 1. If one of the following is true
+ * - c is the EOF code point or U+002F (/)
+ * - url is special and c is U+005C (\)
+ * - state override is not given and c is U+003F (?) or U+0023 (#)
+ * then:
+ */
+ if (isSpecial(url) && walker.c() === '\\') {
+ /**
+ * 1.1 If url is special and c is U+005C (\), validation error.
+ */
+ validationError("Invalid input string.");
+ }
+ if (isDoubleDotPathSegment(buffer)) {
+ /**
+ * 1.2. If buffer is a double-dot path segment, shorten url’s path,
+ * and then if neither c is U+002F (/), nor url is special and c is
+ * U+005C (\), append the empty string to url’s path.
+ */
+ shorten(url);
+ if (walker.c() !== '/' && !(isSpecial(url) && walker.c() === '\\')) {
+ url.path.push("");
+ }
+ }
+ else if (isSingleDotPathSegment(buffer) && walker.c() !== '/' &&
+ !(isSpecial(url) && walker.c() === '\\')) {
+ /**
+ * 1.3. Otherwise, if buffer is a single-dot path segment and if
+ * neither c is U+002F (/), nor url is special and c is U+005C (\),
+ * append the empty string to url’s path.
+ */
+ url.path.push("");
+ }
+ else if (!isSingleDotPathSegment(buffer)) {
+ /**
+ * 1.4. Otherwise, if buffer is not a single-dot path segment, then:
+ */
+ if (url.scheme === "file" && url.path.length === 0 &&
+ isWindowsDriveLetter(buffer)) {
+ /**
+ * 1.4.1. If url’s scheme is "file", url’s path is empty, and
+ * buffer is a Windows drive letter, then:
+ * 1.4.1.1. If url’s host is neither the empty string nor null,
+ * validation error, set url’s host to the empty string.
+ * 1.4.1.2. Replace the second code point in buffer with U+003A (:).
+ * _Note:_ is a (platform-independent) Windows drive letter quirk.
+ */
+ if (url.host !== null && url.host !== "") {
+ validationError("Invalid input string.");
+ url.host = "";
+ }
+ var bufferCodePoints = Array.from(buffer);
+ buffer = bufferCodePoints.slice(0, 1) + ':' + bufferCodePoints.slice(2);
+ }
+ /**
+ * 1.4.2. Append buffer to url’s path.
+ */
+ url.path.push(buffer);
+ }
+ /**
+ * 1.5. Set buffer to the empty string.
+ */
+ buffer = "";
+ /**
+ * 1.6. If url’s scheme is "file" and c is the EOF code point,
+ * U+003F (?), or U+0023 (#), then while url’s path’s size is
+ * greater than 1 and url’s path[0] is the empty string, validation
+ * error, remove the first item from url’s path.
+ */
+ if (url.scheme === "file" && (walker.c() === EOF || walker.c() === '?' || walker.c() === '#')) {
+ while (url.path.length > 1 && url.path[0] === "") {
+ validationError("Invalid input string.");
+ url.path.splice(0, 1);
+ }
+ }
+ /**
+ * 1.7. If c is U+003F (?), then set url’s query to the empty string
+ * and state to query state.
+ * 1.8. If c is U+0023 (#), then set url’s fragment to the empty
+ * string and state to fragment state.
+ */
+ if (walker.c() === '?') {
+ url.query = "";
+ state = interfaces_1.ParserState.Query;
+ }
+ if (walker.c() === '#') {
+ url.fragment = "";
+ state = interfaces_1.ParserState.Fragment;
+ }
+ }
+ else {
+ /**
+ * 2. Otherwise, run these steps:
+ * 2.1. If c is not a URL code point and not U+0025 (%), validation
+ * error.
+ * 2.2. If c is U+0025 (%) and remaining does not start with two
+ * ASCII hex digits, validation error.
+ * 2.3. UTF-8 percent encode c using the path percent-encode set,
+ * and append the result to buffer.
+ */
+ if (!_urlCodePoints.test(walker.c()) && walker.c() !== '%') {
+ validationError("Character is not a URL code point or a percent encoded character.");
+ }
+ if (walker.c() === '%' && !/^[0-9a-fA-F][0-9a-fA-F]/.test(walker.remaining())) {
+ validationError("Percent encoded character must be followed by two hex digits.");
+ }
+ buffer += utf8PercentEncode(walker.c(), _pathPercentEncodeSet);
+ }
+ break;
+ case interfaces_1.ParserState.CannotBeABaseURLPath:
+ /**
+ * 1. If c is U+003F (?), then set url’s query to the empty string and
+ * state to query state.
+ * 2. Otherwise, if c is U+0023 (#), then set url’s fragment to the
+ * empty string and state to fragment state.
+ * 3. Otherwise:
+ * 3.1. If c is not the EOF code point, not a URL code point, and not
+ * U+0025 (%), validation error.
+ * 3.2. If c is U+0025 (%) and remaining does not start with two ASCII
+ * hex digits, validation error.
+ * 3.3. If c is not the EOF code point, UTF-8 percent encode c using
+ * the C0 control percent-encode set, and append the result to url’s
+ * path[0].
+ */
+ if (walker.c() === '?') {
+ url.query = "";
+ state = interfaces_1.ParserState.Query;
+ }
+ else if (walker.c() === '#') {
+ url.fragment = "";
+ state = interfaces_1.ParserState.Fragment;
+ }
+ else {
+ if (walker.c() !== EOF && !_urlCodePoints.test(walker.c()) && walker.c() !== '%') {
+ validationError("Character is not a URL code point or a percent encoded character.");
+ }
+ if (walker.c() === '%' && !/^[0-9a-fA-F][0-9a-fA-F]/.test(walker.remaining())) {
+ validationError("Percent encoded character must be followed by two hex digits.");
+ }
+ if (walker.c() !== EOF) {
+ url.path[0] += utf8PercentEncode(walker.c(), _c0ControlPercentEncodeSet);
+ }
+ }
+ break;
+ case interfaces_1.ParserState.Query:
+ /**
+ * 1. If encoding is not UTF-8 and one of the following is true
+ * - url is not special
+ * - url’s scheme is "ws" or "wss"
+ * then set encoding to UTF-8.
+ */
+ if (encoding !== "UTF-8" && (!isSpecial(url) ||
+ url.scheme === "ws" || url.scheme === "wss")) {
+ encoding = "UTF-8";
+ }
+ if (stateOverride === undefined && walker.c() === '#') {
+ /**
+ * 2. If state override is not given and c is U+0023 (#), then set
+ * url’s fragment to the empty string and state to fragment state.
+ */
+ url.fragment = "";
+ state = interfaces_1.ParserState.Fragment;
+ }
+ else if (walker.c() !== EOF) {
+ /**
+ * 3. Otherwise, if c is not the EOF code point:
+ * 3.1. If c is not a URL code point and not U+0025 (%), validation
+ * error.
+ */
+ if (!_urlCodePoints.test(walker.c()) && walker.c() !== '%') {
+ validationError("Character is not a URL code point or a percent encoded character.");
+ }
+ /**
+ * 3.2. If c is U+0025 (%) and remaining does not start with two
+ * ASCII hex digits, validation error.
+ */
+ if (walker.c() === '%' && !/^[0-9a-fA-F][0-9a-fA-F]/.test(walker.remaining())) {
+ validationError("Percent encoded character must be followed by two hex digits.");
+ }
+ /**
+ * 3.3. Let bytes be the result of encoding c using encoding.
+ */
+ if (encoding.toUpperCase() !== "UTF-8") {
+ throw new Error("Only UTF-8 encoding is supported.");
+ }
+ var bytes = util_1.utf8Encode(walker.c());
+ /**
+ * 3.4. If bytes starts with `` and ends with 0x3B (;), then:
+ */
+ if (bytes.length >= 3 && bytes[0] === 38 && bytes[1] === 35 &&
+ bytes[bytes.length - 1] === 59) {
+ /**
+ * 3.4.1. Replace `` at the start of bytes with `%26%23`.
+ * 3.4.2. Replace 0x3B (;) at the end of bytes with `%3B`.
+ * 3.4.4. Append bytes, isomorphic decoded, to url’s query.
+ * _Note:_ can happen when encoding code points using a
+ * non-UTF-8 encoding.
+ */
+ bytes = bytes.subarray(2, bytes.length - 1);
+ url.query += "%26%23" + infra_1.byteSequence.isomorphicDecode(bytes) + "%3B";
+ }
+ else {
+ try {
+ /**
+ * 3.5. Otherwise, for each byte in bytes:
+ * 3.5.1. If one of the following is true
+ * - byte is less than 0x21 (!)
+ * - byte is greater than 0x7E (~)
+ * - byte is 0x22 ("), 0x23 (#), 0x3C (<), or 0x3E (>)
+ * - byte is 0x27 (') and url is special
+ * then append byte, percent encoded, to url’s query.
+ * 3.5.2. Otherwise, append a code point whose value is byte to
+ * url’s query.
+ */
+ for (var bytes_1 = (e_3 = void 0, __values(bytes)), bytes_1_1 = bytes_1.next(); !bytes_1_1.done; bytes_1_1 = bytes_1.next()) {
+ var byte = bytes_1_1.value;
+ if (byte < 0x21 || byte > 0x7E || byte === 0x22 ||
+ byte === 0x23 || byte === 0x3C || byte === 0x3E ||
+ (byte === 0x27 && isSpecial(url))) {
+ url.query += percentEncode(byte);
+ }
+ else {
+ url.query += String.fromCharCode(byte);
+ }
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (bytes_1_1 && !bytes_1_1.done && (_b = bytes_1.return)) _b.call(bytes_1);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ }
+ }
+ break;
+ case interfaces_1.ParserState.Fragment:
+ /**
+ * Switching on c:
+ * - The EOF code point
+ * Do nothing.
+ * - U+0000 NULL
+ * Validation error.
+ * - Otherwise
+ * 1. If c is not a URL code point and not U+0025 (%), validation
+ * error.
+ * 2. If c is U+0025 (%) and remaining does not start with two ASCII
+ * hex digits, validation error.
+ * 3. UTF-8 percent encode c using the fragment percent-encode set and
+ * append the result to url’s fragment.
+ */
+ if (walker.c() === EOF) {
+ //
+ }
+ else if (walker.c() === "\u0000") {
+ validationError("NULL character in input string.");
+ }
+ else {
+ if (!_urlCodePoints.test(walker.c()) && walker.c() !== '%') {
+ validationError("Unexpected character in fragment string.");
+ }
+ if (walker.c() === '%' && !/^[A-Za-z0-9][A-Za-z0-9]/.test(walker.remaining())) {
+ validationError("Unexpected character in fragment string.");
+ }
+ url.fragment += utf8PercentEncode(walker.c(), _fragmentPercentEncodeSet);
+ }
+ break;
+ }
+ if (walker.eof)
+ break;
+ else
+ walker.pointer++;
+ }
+ /**
+ * 12. Return url.
+ */
+ return url;
+}
+exports.basicURLParser = basicURLParser;
+/**
+ * Sets a URL's username.
+ *
+ * @param url - a URL
+ * @param username - username string
+ */
+function setTheUsername(url, username) {
+ var e_4, _a;
+ /**
+ * 1. Set url’s username to the empty string.
+ * 2. For each code point in username, UTF-8 percent encode it using the
+ * userinfo percent-encode set, and append the result to url’s username.
+ */
+ var result = "";
+ try {
+ for (var username_1 = __values(username), username_1_1 = username_1.next(); !username_1_1.done; username_1_1 = username_1.next()) {
+ var codePoint = username_1_1.value;
+ result += utf8PercentEncode(codePoint, _userInfoPercentEncodeSet);
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (username_1_1 && !username_1_1.done && (_a = username_1.return)) _a.call(username_1);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+ url.username = result;
+}
+exports.setTheUsername = setTheUsername;
+/**
+ * Sets a URL's password.
+ *
+ * @param url - a URL
+ * @param username - password string
+ */
+function setThePassword(url, password) {
+ var e_5, _a;
+ /**
+ * 1. Set url’s password to the empty string.
+ * 2. For each code point in password, UTF-8 percent encode it using the
+ * userinfo percent-encode set, and append the result to url’s password.
+ */
+ var result = "";
+ try {
+ for (var password_1 = __values(password), password_1_1 = password_1.next(); !password_1_1.done; password_1_1 = password_1.next()) {
+ var codePoint = password_1_1.value;
+ result += utf8PercentEncode(codePoint, _userInfoPercentEncodeSet);
+ }
+ }
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
+ finally {
+ try {
+ if (password_1_1 && !password_1_1.done && (_a = password_1.return)) _a.call(password_1);
+ }
+ finally { if (e_5) throw e_5.error; }
+ }
+ url.password = result;
+}
+exports.setThePassword = setThePassword;
+/**
+ * Determines if the string represents a single dot path.
+ *
+ * @param str - a string
+ */
+function isSingleDotPathSegment(str) {
+ return str === '.' || str.toLowerCase() === "%2e";
+}
+exports.isSingleDotPathSegment = isSingleDotPathSegment;
+/**
+ * Determines if the string represents a double dot path.
+ *
+ * @param str - a string
+ */
+function isDoubleDotPathSegment(str) {
+ var lowerStr = str.toLowerCase();
+ return lowerStr === ".." || lowerStr === ".%2e" ||
+ lowerStr === "%2e." || lowerStr === "%2e%2e";
+}
+exports.isDoubleDotPathSegment = isDoubleDotPathSegment;
+/**
+ * Shorten's URL's path.
+ *
+ * @param url - an URL
+ */
+function shorten(url) {
+ /**
+ * 1. Let path be url’s path.
+ * 2. If path is empty, then return.
+ * 3. If url’s scheme is "file", path’s size is 1, and path[0] is a
+ * normalized Windows drive letter, then return.
+ * 4. Remove path’s last item.
+ */
+ var path = url.path;
+ if (path.length === 0)
+ return;
+ if (url.scheme === "file" && path.length === 1 &&
+ isNormalizedWindowsDriveLetter(path[0]))
+ return;
+ url.path.splice(url.path.length - 1, 1);
+}
+exports.shorten = shorten;
+/**
+ * Determines if a string is a normalized Windows drive letter.
+ *
+ * @param str - a string
+ */
+function isNormalizedWindowsDriveLetter(str) {
+ /**
+ * A normalized Windows drive letter is a Windows drive letter of which the
+ * second code point is U+003A (:).
+ */
+ return str.length >= 2 && infra_1.codePoint.ASCIIAlpha.test(str[0]) &&
+ str[1] === ':';
+}
+exports.isNormalizedWindowsDriveLetter = isNormalizedWindowsDriveLetter;
+/**
+ * Determines if a string is a Windows drive letter.
+ *
+ * @param str - a string
+ */
+function isWindowsDriveLetter(str) {
+ /**
+ * A Windows drive letter is two code points, of which the first is an ASCII
+ * alpha and the second is either U+003A (:) or U+007C (|).
+ */
+ return str.length >= 2 && infra_1.codePoint.ASCIIAlpha.test(str[0]) &&
+ (str[1] === ':' || str[1] === '|');
+}
+exports.isWindowsDriveLetter = isWindowsDriveLetter;
+/**
+ * Determines if a string starts with a Windows drive letter.
+ *
+ * @param str - a string
+ */
+function startsWithAWindowsDriveLetter(str) {
+ /**
+ * A string starts with a Windows drive letter if all of the following are
+ * true:
+ * - its length is greater than or equal to 2
+ * - its first two code points are a Windows drive letter
+ * - its length is 2 or its third code point is U+002F (/), U+005C (\),
+ * U+003F (?), or U+0023 (#).
+ */
+ return str.length >= 2 && isWindowsDriveLetter(str) &&
+ (str.length === 2 || (str[2] === '/' || str[2] === '\\' ||
+ str[2] === '?' || str[2] === '#'));
+}
+exports.startsWithAWindowsDriveLetter = startsWithAWindowsDriveLetter;
+/**
+ * Parses a host string.
+ *
+ * @param input - input string
+ * @param isNotSpecial - `true` if the source URL is not special; otherwise
+ * `false`.
+ */
+function hostParser(input, isNotSpecial) {
+ if (isNotSpecial === void 0) { isNotSpecial = false; }
+ /**
+ * 1. If isNotSpecial is not given, then set isNotSpecial to false.
+ * 2. If input starts with U+005B ([), then:
+ * 2.1. If input does not end with U+005D (]), validation error, return
+ * failure.
+ * 2.2. Return the result of IPv6 parsing input with its leading U+005B ([)
+ * and trailing U+005D (]) removed.
+ */
+ if (input.startsWith('[')) {
+ if (!input.endsWith(']')) {
+ validationError("Expected ']' after '['.");
+ return null;
+ }
+ return iPv6Parser(input.substring(1, input.length - 1));
+ }
+ /**
+ * 3. If isNotSpecial is true, then return the result of opaque-host parsing
+ * input.
+ */
+ if (isNotSpecial) {
+ return opaqueHostParser(input);
+ }
+ /**
+ * 4. Let domain be the result of running UTF-8 decode without BOM on the
+ * string percent decoding of input.
+ * _Note:_ Alternatively UTF-8 decode without BOM or fail can be used,
+ * coupled with an early return for failure, as domain to ASCII fails
+ * on U+FFFD REPLACEMENT CHARACTER.
+ */
+ var domain = util_1.utf8Decode(stringPercentDecode(input));
+ /**
+ * 5. Let asciiDomain be the result of running domain to ASCII on domain.
+ * 6. If asciiDomain is failure, validation error, return failure.
+ * 7. If asciiDomain contains a forbidden host code point, validation error,
+ * return failure.
+ */
+ var asciiDomain = domainToASCII(domain);
+ if (asciiDomain === null) {
+ validationError("Invalid domain.");
+ return null;
+ }
+ if (_forbiddenHostCodePoint.test(asciiDomain)) {
+ validationError("Invalid domain.");
+ return null;
+ }
+ /**
+ * 8. Let ipv4Host be the result of IPv4 parsing asciiDomain.
+ * 9. If ipv4Host is an IPv4 address or failure, return ipv4Host.
+ * 10. Return asciiDomain.
+ */
+ var ipv4Host = iPv4Parser(asciiDomain);
+ if (ipv4Host === null || util_1.isNumber(ipv4Host))
+ return ipv4Host;
+ return asciiDomain;
+}
+exports.hostParser = hostParser;
+/**
+ * Parses a string containing an IP v4 address.
+ *
+ * @param input - input string
+ * @param isNotSpecial - `true` if the source URL is not special; otherwise
+ * `false`.
+ */
+function iPv4NumberParser(input, validationErrorFlag) {
+ if (validationErrorFlag === void 0) { validationErrorFlag = { value: false }; }
+ /**
+ * 1. Let R be 10.
+ */
+ var R = 10;
+ if (input.startsWith("0x") || input.startsWith("0X")) {
+ /**
+ * 2. If input contains at least two code points and the first two code
+ * points are either "0x" or "0X", then:
+ * 2.1. Set validationErrorFlag.
+ * 2.2. Remove the first two code points from input.
+ * 2.3. Set R to 16.
+ */
+ validationErrorFlag.value = true;
+ input = input.substr(2);
+ R = 16;
+ }
+ else if (input.length >= 2 && input[0] === '0') {
+ /**
+ * 3. Otherwise, if input contains at least two code points and the first
+ * code point is U+0030 (0), then:
+ * 3.1. Set validationErrorFlag.
+ * 3.2. Remove the first code point from input.
+ * 3.3. Set R to 8.
+ */
+ validationErrorFlag.value = true;
+ input = input.substr(1);
+ R = 8;
+ }
+ /**
+ * 4. If input is the empty string, then return zero.
+ * 5. If input contains a code point that is not a radix-R digit, then
+ * return failure.
+ */
+ if (input === "")
+ return 0;
+ var radixRDigits = (R === 10 ? /^[0-9]+$/ : (R === 16 ? /^[0-9A-Fa-f]+$/ : /^[0-7]+$/));
+ if (!radixRDigits.test(input))
+ return null;
+ /**
+ * 6. Return the mathematical integer value that is represented by input in
+ * radix-R notation, using ASCII hex digits for digits with values
+ * 0 through 15.
+ */
+ return parseInt(input, R);
+}
+exports.iPv4NumberParser = iPv4NumberParser;
+/**
+ * Parses a string containing an IP v4 address.
+ *
+ * @param input - input string
+ */
+function iPv4Parser(input) {
+ var e_6, _a, e_7, _b;
+ /**
+ * 1. Let validationErrorFlag be unset.
+ * 2. Let parts be input split on U+002E (.).
+ */
+ var validationErrorFlag = { value: false };
+ var parts = input.split('.');
+ /**
+ * 3. If the last item in parts is the empty string, then:
+ * 3.1. Set validationErrorFlag.
+ * 3.2. If parts has more than one item, then remove the last item from
+ * parts.
+ */
+ if (parts[parts.length - 1] === "") {
+ validationErrorFlag.value = true;
+ if (parts.length > 1)
+ parts.pop();
+ }
+ /**
+ * 4. If parts has more than four items, return input.
+ */
+ if (parts.length > 4)
+ return input;
+ /**
+ * 5. Let numbers be the empty list.
+ * 6. For each part in parts:
+ * 6.1. If part is the empty string, return input.
+ * 6.2. Let n be the result of parsing part using validationErrorFlag.
+ * 6.3. If n is failure, return input.
+ * 6.4. Append n to numbers.
+ */
+ var numbers = [];
+ try {
+ for (var parts_1 = __values(parts), parts_1_1 = parts_1.next(); !parts_1_1.done; parts_1_1 = parts_1.next()) {
+ var part = parts_1_1.value;
+ if (part === "")
+ return input;
+ var n = iPv4NumberParser(part, validationErrorFlag);
+ if (n === null)
+ return input;
+ numbers.push(n);
+ }
+ }
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
+ finally {
+ try {
+ if (parts_1_1 && !parts_1_1.done && (_a = parts_1.return)) _a.call(parts_1);
+ }
+ finally { if (e_6) throw e_6.error; }
+ }
+ /**
+ * 7. If validationErrorFlag is set, validation error.
+ * 8. If any item in numbers is greater than 255, validation error.
+ * 9. If any but the last item in numbers is greater than 255, return
+ * failure.
+ * 10. If the last item in numbers is greater than or equal to
+ * 256**(5 − the number of items in numbers), validation error, return failure.
+ */
+ if (validationErrorFlag.value)
+ validationError("Invalid IP v4 address.");
+ for (var i = 0; i < numbers.length; i++) {
+ var item = numbers[i];
+ if (item > 255) {
+ validationError("Invalid IP v4 address.");
+ if (i < numbers.length - 1)
+ return null;
+ }
+ }
+ if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) {
+ validationError("Invalid IP v4 address.");
+ return null;
+ }
+ /**
+ * 11. Let ipv4 be the last item in numbers.
+ * 12. Remove the last item from numbers.
+ */
+ var ipv4 = numbers[numbers.length - 1];
+ numbers.pop();
+ /**
+ * 13. Let counter be zero.
+ * 14. For each n in numbers:
+ * 14.2. Increment ipv4 by n × 256**(3 − counter).
+ * 14.2. Increment counter by 1.
+ */
+ var counter = 0;
+ try {
+ for (var numbers_1 = __values(numbers), numbers_1_1 = numbers_1.next(); !numbers_1_1.done; numbers_1_1 = numbers_1.next()) {
+ var n = numbers_1_1.value;
+ ipv4 += n * Math.pow(256, 3 - counter);
+ counter++;
+ }
+ }
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
+ finally {
+ try {
+ if (numbers_1_1 && !numbers_1_1.done && (_b = numbers_1.return)) _b.call(numbers_1);
+ }
+ finally { if (e_7) throw e_7.error; }
+ }
+ /**
+ * 15. Return ipv4.
+ */
+ return ipv4;
+}
+exports.iPv4Parser = iPv4Parser;
+/**
+ * Parses a string containing an IP v6 address.
+ *
+ * @param input - input string
+ */
+function iPv6Parser(input) {
+ var _a;
+ /**
+ * 1. Let address be a new IPv6 address whose IPv6 pieces are all 0.
+ * 2. Let pieceIndex be 0.
+ * 3. Let compress be null.
+ * 4. Let pointer be a pointer into input, initially 0 (pointing to the
+ * first code point).
+ */
+ var EOF = "";
+ var address = [0, 0, 0, 0, 0, 0, 0, 0];
+ var pieceIndex = 0;
+ var compress = null;
+ var walker = new util_1.StringWalker(input);
+ /**
+ * 5. If c is U+003A (:), then:
+ * 5.1. If remaining does not start with U+003A (:), validation error,
+ * return failure.
+ * 5.2. Increase pointer by 2.
+ * 5.3. Increase pieceIndex by 1 and then set compress to pieceIndex.
+ */
+ if (walker.c() === ':') {
+ if (!walker.remaining().startsWith(':')) {
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ walker.pointer += 2;
+ pieceIndex += 1;
+ compress = pieceIndex;
+ }
+ /**
+ * 6. While c is not the EOF code point:
+ */
+ while (walker.c() !== EOF) {
+ /**
+ * 6.1. If pieceIndex is 8, validation error, return failure.
+ */
+ if (pieceIndex === 8) {
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ /**
+ * 6.2. If c is U+003A (:), then:
+ * 6.2.1. If compress is non-null, validation error, return failure.
+ * 6.2.2. Increase pointer and pieceIndex by 1, set compress to pieceIndex,
+ * and then continue.
+ */
+ if (walker.c() === ':') {
+ if (compress !== null) {
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ walker.pointer++;
+ pieceIndex++;
+ compress = pieceIndex;
+ continue;
+ }
+ /**
+ * 6.3. Let value and length be 0.
+ * 6.4. While length is less than 4 and c is an ASCII hex digit, set value
+ * to value × 0x10 + c interpreted as hexadecimal number, and increase
+ * pointer and length by 1.
+ */
+ var value = 0;
+ var length = 0;
+ while (length < 4 && infra_1.codePoint.ASCIIHexDigit.test(walker.c())) {
+ value = value * 0x10 + parseInt(walker.c(), 16);
+ walker.pointer++;
+ length++;
+ }
+ /**
+ * 6.5. If c is U+002E (.), then:
+ */
+ if (walker.c() === '.') {
+ /**
+ * 6.5.1. If length is 0, validation error, return failure.
+ * 6.5.2. Decrease pointer by length.
+ * 6.5.3. If pieceIndex is greater than 6, validation error, return
+ * failure.
+ * 6.5.4. Let numbersSeen be 0.
+ */
+ if (length === 0) {
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ walker.pointer -= length;
+ if (pieceIndex > 6) {
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ var numbersSeen = 0;
+ /**
+ * 6.5.5. While c is not the EOF code point:
+ */
+ while (walker.c() !== EOF) {
+ /**
+ * 6.5.5.1. Let ipv4Piece be null.
+ */
+ var ipv4Piece = null;
+ /**
+ * 6.5.5.2. If numbersSeen is greater than 0, then:
+ * 6.5.5.2.1. If c is a U+002E (.) and numbersSeen is less than 4, then
+ * increase pointer by 1.
+ * 6.5.5.2.1. Otherwise, validation error, return failure.
+ */
+ if (numbersSeen > 0) {
+ if (walker.c() === '.' && numbersSeen < 4) {
+ walker.pointer++;
+ }
+ else {
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ }
+ /**
+ * 6.5.5.3. If c is not an ASCII digit, validation error, return
+ * failure.
+ */
+ if (!infra_1.codePoint.ASCIIDigit.test(walker.c())) {
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ /**
+ * 6.5.5.4. While c is an ASCII digit:
+ */
+ while (infra_1.codePoint.ASCIIDigit.test(walker.c())) {
+ /**
+ * 6.5.5.4.1. Let number be c interpreted as decimal number.
+ */
+ var number = parseInt(walker.c(), 10);
+ /**
+ * 6.5.5.4.2. If ipv4Piece is null, then set ipv4Piece to number.
+ * Otherwise, if ipv4Piece is 0, validation error, return failure.
+ * Otherwise, set ipv4Piece to ipv4Piece × 10 + number.
+ */
+ if (ipv4Piece === null) {
+ ipv4Piece = number;
+ }
+ else if (ipv4Piece === 0) {
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ else {
+ ipv4Piece = ipv4Piece * 10 + number;
+ }
+ /**
+ * 6.5.5.4.3. If ipv4Piece is greater than 255, validation error, return failure.
+ * 6.5.5.4.4. Increase pointer by 1.
+ */
+ if (ipv4Piece > 255) {
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ walker.pointer++;
+ }
+ /**
+ * 6.5.5.5. Set address[pieceIndex] to address[pieceIndex] × 0x100 + ipv4Piece.
+ * 6.5.5.6. Increase numbersSeen by 1.
+ * 6.5.5.7. If numbersSeen is 2 or 4, then increase pieceIndex by 1.
+ */
+ if (ipv4Piece === null) {
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece;
+ numbersSeen++;
+ if (numbersSeen === 2 || numbersSeen === 4)
+ pieceIndex++;
+ }
+ /**
+ * 6.5.6. If numbersSeen is not 4, validation error, return failure.
+ */
+ if (numbersSeen !== 4) {
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ /**
+ * 6.5.7. Break.
+ */
+ break;
+ }
+ else if (walker.c() === ':') {
+ /**
+ * 6.6. Otherwise, if c is U+003A (:):
+ * 6.6.1. Increase pointer by 1.
+ * 6.6.2. If c is the EOF code point, validation error, return failure.
+ */
+ walker.pointer++;
+ if (walker.c() === EOF) {
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ }
+ else if (walker.c() !== EOF) {
+ /**
+ * 6.7. Otherwise, if c is not the EOF code point, validation error,
+ * return failure.
+ */
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ /**
+ * 6.8. Set address[pieceIndex] to value.
+ * 6.9. Increase pieceIndex by 1.
+ */
+ address[pieceIndex] = value;
+ pieceIndex++;
+ }
+ /**
+ * 7. If compress is non-null, then:
+ * 7.1. Let swaps be pieceIndex − compress.
+ * 7.2. Set pieceIndex to 7.
+ * 7.3. While pieceIndex is not 0 and swaps is greater than 0, swap
+ * address[pieceIndex] with address[compress + swaps − 1], and then decrease
+ * both pieceIndex and swaps by 1.
+ */
+ if (compress !== null) {
+ var swaps = pieceIndex - compress;
+ pieceIndex = 7;
+ while (pieceIndex !== 0 && swaps > 0) {
+ _a = __read([address[compress + swaps - 1], address[pieceIndex]], 2), address[pieceIndex] = _a[0], address[compress + swaps - 1] = _a[1];
+ pieceIndex--;
+ swaps--;
+ }
+ }
+ else if (compress === null && pieceIndex !== 8) {
+ /**
+ * 8. Otherwise, if compress is null and pieceIndex is not 8,
+ * validation error, return failure.
+ */
+ validationError("Invalid IP v6 address.");
+ return null;
+ }
+ /**
+ * 9. Return address.
+ */
+ return address;
+}
+exports.iPv6Parser = iPv6Parser;
+/**
+ * Parses an opaque host string.
+ *
+ * @param input - a string
+ */
+function opaqueHostParser(input) {
+ var e_8, _a;
+ /**
+ * 1. If input contains a forbidden host code point excluding U+0025 (%),
+ * validation error, return failure.
+ * 2. Let output be the empty string.
+ * 3. For each code point in input, UTF-8 percent encode it using the C0
+ * control percent-encode set, and append the result to output.
+ * 4. Return output.
+ */
+ var forbiddenChars = /[\x00\t\f\r #/:?@\[\\\]]/;
+ if (forbiddenChars.test(input)) {
+ validationError("Invalid host string.");
+ return null;
+ }
+ var output = "";
+ try {
+ for (var input_1 = __values(input), input_1_1 = input_1.next(); !input_1_1.done; input_1_1 = input_1.next()) {
+ var codePoint = input_1_1.value;
+ output += utf8PercentEncode(codePoint, _c0ControlPercentEncodeSet);
+ }
+ }
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
+ finally {
+ try {
+ if (input_1_1 && !input_1_1.done && (_a = input_1.return)) _a.call(input_1);
+ }
+ finally { if (e_8) throw e_8.error; }
+ }
+ return output;
+}
+exports.opaqueHostParser = opaqueHostParser;
+/**
+ * Resolves a Blob URL from the user agent's Blob URL store.
+ * function is not implemented.
+ * See: https://w3c.github.io/FileAPI/#blob-url-resolve
+ *
+ * @param url - an url
+ */
+function resolveABlobURL(url) {
+ return null;
+}
+exports.resolveABlobURL = resolveABlobURL;
+/**
+ * Percent encodes a byte.
+ *
+ * @param value - a byte
+ */
+function percentEncode(value) {
+ /**
+ * To percent encode a byte into a percent-encoded byte, return a string
+ * consisting of U+0025 (%), followed by two ASCII upper hex digits
+ * representing byte.
+ */
+ return '%' + ('00' + value.toString(16).toUpperCase()).slice(-2);
+}
+exports.percentEncode = percentEncode;
+/**
+ * Percent decodes a byte sequence input.
+ *
+ * @param input - a byte sequence
+ */
+function percentDecode(input) {
+ var isHexDigit = function (byte) {
+ return (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x46) ||
+ (byte >= 0x61 && byte <= 0x66);
+ };
+ /**
+ * 1. Let output be an empty byte sequence.
+ * 2. For each byte byte in input:
+ */
+ var output = new Uint8Array(input.length);
+ var n = 0;
+ for (var i = 0; i < input.length; i++) {
+ var byte = input[i];
+ /**
+ * 2.1. If byte is not 0x25 (%), then append byte to output.
+ * 2.2. Otherwise, if byte is 0x25 (%) and the next two bytes after byte
+ * in input are not in the ranges 0x30 (0) to 0x39 (9), 0x41 (A)
+ * to 0x46 (F), and 0x61 (a) to 0x66 (f), all inclusive, append byte
+ * to output.
+ * 2.3. Otherwise:
+ * 2.3.1. Let bytePoint be the two bytes after byte in input, decoded,
+ * and then interpreted as hexadecimal number.
+ * 2.3.2. Append a byte whose value is bytePoint to output.
+ * 2.3.3. Skip the next two bytes in input.
+ */
+ if (byte !== 0x25) {
+ output[n] = byte;
+ n++;
+ }
+ else if (byte === 0x25 && i >= input.length - 2) {
+ output[n] = byte;
+ n++;
+ }
+ else if (byte === 0x25 && (!isHexDigit(input[i + 1]) || !isHexDigit(input[i + 2]))) {
+ output[n] = byte;
+ n++;
+ }
+ else {
+ var bytePoint = parseInt(util_1.utf8Decode(Uint8Array.of(input[i + 1], input[i + 2])), 16);
+ output[n] = bytePoint;
+ n++;
+ i += 2;
+ }
+ }
+ return output.subarray(0, n);
+}
+exports.percentDecode = percentDecode;
+/**
+ * String percent decodes a string.
+ *
+ * @param input - a string
+ */
+function stringPercentDecode(input) {
+ /**
+ * 1. Let bytes be the UTF-8 encoding of input.
+ * 2. Return the percent decoding of bytes.
+ */
+ return percentDecode(util_1.utf8Encode(input));
+}
+exports.stringPercentDecode = stringPercentDecode;
+/**
+ * UTF-8 percent encodes a code point, using a percent encode set.
+ *
+ * @param codePoint - a code point
+ * @param percentEncodeSet - a percent encode set
+ */
+function utf8PercentEncode(codePoint, percentEncodeSet) {
+ var e_9, _a;
+ /**
+ * 1. If codePoint is not in percentEncodeSet, then return codePoint.
+ * 2. Let bytes be the result of running UTF-8 encode on codePoint.
+ * 3. Percent encode each byte in bytes, and then return the results
+ * concatenated, in the same order.
+ */
+ if (!percentEncodeSet.test(codePoint))
+ return codePoint;
+ var bytes = util_1.utf8Encode(codePoint);
+ var result = "";
+ try {
+ for (var bytes_2 = __values(bytes), bytes_2_1 = bytes_2.next(); !bytes_2_1.done; bytes_2_1 = bytes_2.next()) {
+ var byte = bytes_2_1.value;
+ result += percentEncode(byte);
+ }
+ }
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
+ finally {
+ try {
+ if (bytes_2_1 && !bytes_2_1.done && (_a = bytes_2.return)) _a.call(bytes_2);
+ }
+ finally { if (e_9) throw e_9.error; }
+ }
+ return result;
+}
+exports.utf8PercentEncode = utf8PercentEncode;
+/**
+ * Determines if two hosts are considered equal.
+ *
+ * @param hostA - a host
+ * @param hostB - a host
+ */
+function hostEquals(hostA, hostB) {
+ return hostA === hostB;
+}
+exports.hostEquals = hostEquals;
+/**
+ * Determines if two URLs are considered equal.
+ *
+ * @param urlA - a URL
+ * @param urlB - a URL
+ * @param excludeFragmentsFlag - whether to ignore fragments while comparing
+ */
+function urlEquals(urlA, urlB, excludeFragmentsFlag) {
+ if (excludeFragmentsFlag === void 0) { excludeFragmentsFlag = false; }
+ /**
+ * 1. Let serializedA be the result of serializing A, with the exclude
+ * fragment flag set if the exclude fragments flag is set.
+ * 2. Let serializedB be the result of serializing B, with the exclude
+ * fragment flag set if the exclude fragments flag is set.
+ * 3. Return true if serializedA is serializedB, and false otherwise.
+ */
+ return urlSerializer(urlA, excludeFragmentsFlag) ===
+ urlSerializer(urlB, excludeFragmentsFlag);
+}
+exports.urlEquals = urlEquals;
+/**
+ * Parses an `application/x-www-form-urlencoded` string.
+ *
+ * @param input - a string
+ */
+function urlEncodedStringParser(input) {
+ /**
+ * The application/x-www-form-urlencoded string parser takes a string input,
+ * UTF-8 encodes it, and then returns the result of
+ * application/x-www-form-urlencoded parsing it.
+ */
+ return urlEncodedParser(util_1.utf8Encode(input));
+}
+exports.urlEncodedStringParser = urlEncodedStringParser;
+/**
+ * Parses `application/x-www-form-urlencoded` bytes.
+ *
+ * @param input - a byte sequence
+ */
+function urlEncodedParser(input) {
+ var e_10, _a, e_11, _b;
+ /**
+ * 1. Let sequences be the result of splitting input on 0x26 (&).
+ */
+ var sequences = [];
+ var currentSequence = [];
+ try {
+ for (var input_2 = __values(input), input_2_1 = input_2.next(); !input_2_1.done; input_2_1 = input_2.next()) {
+ var byte = input_2_1.value;
+ if (byte === 0x26) {
+ sequences.push(Uint8Array.from(currentSequence));
+ currentSequence = [];
+ }
+ else {
+ currentSequence.push(byte);
+ }
+ }
+ }
+ catch (e_10_1) { e_10 = { error: e_10_1 }; }
+ finally {
+ try {
+ if (input_2_1 && !input_2_1.done && (_a = input_2.return)) _a.call(input_2);
+ }
+ finally { if (e_10) throw e_10.error; }
+ }
+ if (currentSequence.length !== 0) {
+ sequences.push(Uint8Array.from(currentSequence));
+ }
+ /**
+ * 2. Let output be an initially empty list of name-value tuples where both name and value hold a string.
+ */
+ var output = [];
+ try {
+ /**
+ * 3. For each byte sequence bytes in sequences:
+ */
+ for (var sequences_1 = __values(sequences), sequences_1_1 = sequences_1.next(); !sequences_1_1.done; sequences_1_1 = sequences_1.next()) {
+ var bytes = sequences_1_1.value;
+ /**
+ * 3.1. If bytes is the empty byte sequence, then continue.
+ */
+ if (bytes.length === 0)
+ continue;
+ /**
+ * 3.2. If bytes contains a 0x3D (=), then let name be the bytes from the
+ * start of bytes up to but excluding its first 0x3D (=), and let value be
+ * the bytes, if any, after the first 0x3D (=) up to the end of bytes.
+ * If 0x3D (=) is the first byte, then name will be the empty byte
+ * sequence. If it is the last, then value will be the empty byte sequence.
+ * 3.3. Otherwise, let name have the value of bytes and let value be the
+ * empty byte sequence.
+ */
+ var index = bytes.indexOf(0x3D);
+ var name = (index !== -1 ? bytes.slice(0, index) : bytes);
+ var value = (index !== -1 ? bytes.slice(index + 1) : new Uint8Array());
+ /**
+ * 3.4. Replace any 0x2B (+) in name and value with 0x20 (SP).
+ */
+ for (var i = 0; i < name.length; i++)
+ if (name[i] === 0x2B)
+ name[i] = 0x20;
+ for (var i = 0; i < value.length; i++)
+ if (value[i] === 0x2B)
+ value[i] = 0x20;
+ /**
+ * 3.5. Let nameString and valueString be the result of running UTF-8
+ * decode without BOM on the percent decoding of name and value,
+ * respectively.
+ */
+ var nameString = util_1.utf8Decode(name);
+ var valueString = util_1.utf8Decode(value);
+ /**
+ * 3.6. Append (nameString, valueString) to output.
+ */
+ output.push([nameString, valueString]);
+ }
+ }
+ catch (e_11_1) { e_11 = { error: e_11_1 }; }
+ finally {
+ try {
+ if (sequences_1_1 && !sequences_1_1.done && (_b = sequences_1.return)) _b.call(sequences_1);
+ }
+ finally { if (e_11) throw e_11.error; }
+ }
+ /**
+ * 4. Return output.
+ */
+ return output;
+}
+exports.urlEncodedParser = urlEncodedParser;
+/**
+ * Serializes `application/x-www-form-urlencoded` bytes.
+ *
+ * @param input - a byte sequence
+ */
+function urlEncodedByteSerializer(input) {
+ var e_12, _a;
+ /**
+ * 1. Let output be the empty string.
+ * 2. For each byte in input, depending on byte:
+ * 0x20 (SP)
+ * Append U+002B (+) to output.
+ *
+ * 0x2A (*)
+ * 0x2D (-)
+ * 0x2E (.)
+ * 0x30 (0) to 0x39 (9)
+ * 0x41 (A) to 0x5A (Z)
+ * 0x5F (_)
+ * 0x61 (a) to 0x7A (z)
+ * Append a code point whose value is byte to output.
+ *
+ * Otherwise
+ * Append byte, percent encoded, to output.
+ * 3. Return output.
+ */
+ var output = "";
+ try {
+ for (var input_3 = __values(input), input_3_1 = input_3.next(); !input_3_1.done; input_3_1 = input_3.next()) {
+ var byte = input_3_1.value;
+ if (byte === 0x20) {
+ output += '+';
+ }
+ else if (byte === 0x2A || byte === 0x2D || byte === 0x2E ||
+ (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x5A) ||
+ byte === 0x5F || (byte >= 0x61 && byte <= 0x7A)) {
+ output += String.fromCodePoint(byte);
+ }
+ else {
+ output += percentEncode(byte);
+ }
+ }
+ }
+ catch (e_12_1) { e_12 = { error: e_12_1 }; }
+ finally {
+ try {
+ if (input_3_1 && !input_3_1.done && (_a = input_3.return)) _a.call(input_3);
+ }
+ finally { if (e_12) throw e_12.error; }
+ }
+ return output;
+}
+exports.urlEncodedByteSerializer = urlEncodedByteSerializer;
+/**
+ * Serializes `application/x-www-form-urlencoded` tuples.
+ *
+ * @param input - input tuple of name/value pairs
+ * @param encodingOverride: encoding override
+ */
+function urlEncodedSerializer(tuples, encodingOverride) {
+ var e_13, _a;
+ /**
+ * 1. Let encoding be UTF-8.
+ * 2. If encoding override is given, set encoding to the result of getting
+ * an output encoding from encoding override.
+ */
+ var encoding = (encodingOverride === undefined ||
+ encodingOverride === "replacement" || encodingOverride === "UTF-16BE" ||
+ encodingOverride === "UTF-16LE" ? "UTF-8" : encodingOverride);
+ if (encoding.toUpperCase() !== "UTF-8") {
+ throw new Error("Only UTF-8 encoding is supported.");
+ }
+ /**
+ * 3. Let output be the empty string.
+ */
+ var output = "";
+ try {
+ /**
+ * 4. For each tuple in tuples:
+ */
+ for (var tuples_1 = __values(tuples), tuples_1_1 = tuples_1.next(); !tuples_1_1.done; tuples_1_1 = tuples_1.next()) {
+ var tuple = tuples_1_1.value;
+ /**
+ * 4.1. Let name be the result of serializing the result of encoding
+ * tuple’s name, using encoding.
+ */
+ var name = urlEncodedByteSerializer(util_1.utf8Encode(tuple[0]));
+ /**
+ * 4.2. Let value be tuple’s value.
+ */
+ var value = tuple[1];
+ /**
+ * TODO:
+ * 4.3. If value is a file, then set value to value’s filename.
+ */
+ /**
+ * 4.4. Set value to the result of serializing the result of encoding
+ * value, using encoding.
+ */
+ value = urlEncodedByteSerializer(util_1.utf8Encode(value));
+ /**
+ * 4.5. If tuple is not the first pair in tuples, then append U+0026 (&)
+ * to output.
+ */
+ if (output !== "")
+ output += '&';
+ /**
+ * 4.6. Append name, followed by U+003D (=), followed by value, to output.
+ */
+ output += name + '=' + value;
+ }
+ }
+ catch (e_13_1) { e_13 = { error: e_13_1 }; }
+ finally {
+ try {
+ if (tuples_1_1 && !tuples_1_1.done && (_a = tuples_1.return)) _a.call(tuples_1);
+ }
+ finally { if (e_13) throw e_13.error; }
+ }
+ /**
+ * 5. Return output.
+ */
+ return output;
+}
+exports.urlEncodedSerializer = urlEncodedSerializer;
+/**
+ * Returns a URL's origin.
+ *
+ * @param url - a URL
+ */
+function origin(url) {
+ /**
+ * A URL’s origin is the origin returned by running these steps, switching
+ * on URL’s scheme:
+ * "blob"
+ * 1. If URL’s blob URL entry is non-null, then return URL’s blob URL
+ * entry’s environment’s origin.
+ * 2. Let url be the result of parsing URL’s path[0].
+ * 3. Return a new opaque origin, if url is failure, and url’s origin
+ * otherwise.
+ * "ftp"
+ * "http"
+ * "https"
+ * "ws"
+ * "wss"
+ * Return a tuple consisting of URL’s scheme, URL’s host, URL’s port, and
+ * null.
+ * "file"
+ * Unfortunate as it is, is left as an exercise to the reader. When in
+ * doubt, return a new opaque origin.
+ * Otherwise
+ * Return a new opaque origin.
+ */
+ switch (url.scheme) {
+ case "blob":
+ if (url._blobURLEntry !== null) {
+ // TODO: return URL’s blob URL entry’s environment’s origin.
+ }
+ var parsedURL = basicURLParser(url.path[0]);
+ if (parsedURL === null)
+ return interfaces_1.OpaqueOrigin;
+ else
+ return origin(parsedURL);
+ case "ftp":
+ case "http":
+ case "https":
+ case "ws":
+ case "wss":
+ return [url.scheme, url.host === null ? "" : url.host, url.port, null];
+ case "file":
+ return interfaces_1.OpaqueOrigin;
+ default:
+ return interfaces_1.OpaqueOrigin;
+ }
+}
+exports.origin = origin;
+/**
+ * Converts a domain string to ASCII.
+ *
+ * @param domain - a domain string
+ */
+function domainToASCII(domain, beStrict) {
+ if (beStrict === void 0) { beStrict = false; }
+ /**
+ * 1. If beStrict is not given, set it to false.
+ * 2. Let result be the result of running Unicode ToASCII with domain_name
+ * set to domain, UseSTD3ASCIIRules set to beStrict, CheckHyphens set to
+ * false, CheckBidi set to true, CheckJoiners set to true,
+ * Transitional_Processing set to false, and VerifyDnsLength set to beStrict.
+ * 3. If result is a failure value, validation error, return failure.
+ * 4. Return result.
+ */
+ // Use node.js function
+ var result = url_1.domainToASCII(domain);
+ if (result === "") {
+ validationError("Invalid domain name.");
+ return null;
+ }
+ return result;
+}
+exports.domainToASCII = domainToASCII;
+/**
+ * Converts a domain string to Unicode.
+ *
+ * @param domain - a domain string
+ */
+function domainToUnicode(domain, beStrict) {
+ if (beStrict === void 0) { beStrict = false; }
+ /**
+ * 1. Let result be the result of running Unicode ToUnicode with domain_name
+ * set to domain, CheckHyphens set to false, CheckBidi set to true,
+ * CheckJoiners set to true, UseSTD3ASCIIRules set to false, and
+ * Transitional_Processing set to false.
+ * 2. Signify validation errors for any returned errors, and then,
+ * return result.
+ */
+ // Use node.js function
+ var result = url_1.domainToUnicode(domain);
+ if (result === "") {
+ validationError("Invalid domain name.");
+ }
+ return result;
+}
+exports.domainToUnicode = domainToUnicode;
+/**
+ * Serializes an origin.
+ * function is from the HTML spec:
+ * https://html.spec.whatwg.org/#ascii-serialisation-of-an-origin
+ *
+ * @param origin - an origin
+ */
+function asciiSerializationOfAnOrigin(origin) {
+ /**
+ * 1. If origin is an opaque origin, then return "null".
+ * 2. Otherwise, let result be origin's scheme.
+ * 3. Append "://" to result.
+ * 4. Append origin's host, serialized, to result.
+ * 5. If origin's port is non-null, append a U+003A COLON character (:),
+ * and origin's port, serialized, to result.
+ * 6. Return result.
+ */
+ if (origin[0] === "" && origin[1] === "" && origin[2] === null && origin[3] === null) {
+ return "null";
+ }
+ var result = origin[0] + "://" + hostSerializer(origin[1]);
+ if (origin[2] !== null)
+ result += ":" + origin[2].toString();
+ return result;
+}
+exports.asciiSerializationOfAnOrigin = asciiSerializationOfAnOrigin;
+//# sourceMappingURL=URLAlgorithm.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/url/lib/URLAlgorithm.js.map b/node_modules/@oozcitak/url/lib/URLAlgorithm.js.map
new file mode 100644
index 0000000..505160e
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/URLAlgorithm.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"URLAlgorithm.js","sourceRoot":"","sources":["../src/URLAlgorithm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwF;AACxF,2CAAiF;AACjF,yCAEwB;AACxB,2BAAgG;AAEhG,IAAI,wBAAiE,CAAA;AAErE;;GAEG;AACH,IAAM,aAAa,GAAqC;IACtD,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,GAAG;IACZ,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,GAAG;CACX,CAAA;AAED;;;GAGG;AACH,IAAM,0BAA0B,GAAG,2IAA2I,CAAA;AAE9K;;;GAGG;AACH,IAAM,yBAAyB,GAAG,mJAAmJ,CAAA;AAErL;;;GAGG;AACH,IAAM,qBAAqB,GAAG,uJAAuJ,CAAA;AAErL;;;;GAIG;AACH,IAAM,yBAAyB,GAAG,sKAAsK,CAAA;AAExM;;;;;;;GAOG;AACH,IAAM,cAAc,GAAG,qZAAqZ,CAAA;AAE5a;;;;GAIG;AAC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node_modules/@oozcitak/url/lib/URLImpl.d.ts
new file mode 100644
index 0000000..45b2bb2
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/URLImpl.d.ts
@@ -0,0 +1,53 @@
+import { URL, URLRecord, URLSearchParams } from "./interfaces";
+/**
+ * Represents an URL.
+ */
+export declare class URLImpl implements URL {
+ _url: URLRecord;
+ _queryObject: URLSearchParams;
+ /**
+ * Initializes a new `URL`.
+ *
+ * @param url - an URL string
+ * @param base - a base URL string
+ */
+ constructor(url: string, baseURL?: string);
+ /** @inheritdoc */
+ get href(): string;
+ set href(value: string);
+ /** @inheritdoc */
+ get origin(): string;
+ /** @inheritdoc */
+ get protocol(): string;
+ set protocol(val: string);
+ /** @inheritdoc */
+ get username(): string;
+ set username(val: string);
+ /** @inheritdoc */
+ get password(): string;
+ set password(val: string);
+ /** @inheritdoc */
+ get host(): string;
+ set host(val: string);
+ /** @inheritdoc */
+ get hostname(): string;
+ set hostname(val: string);
+ /** @inheritdoc */
+ get port(): string;
+ set port(val: string);
+ /** @inheritdoc */
+ get pathname(): string;
+ set pathname(val: string);
+ /** @inheritdoc */
+ get search(): string;
+ set search(val: string);
+ /** @inheritdoc */
+ get searchParams(): URLSearchParams;
+ /** @inheritdoc */
+ get hash(): string;
+ set hash(val: string);
+ /** @inheritdoc */
+ toJSON(): string;
+ /** @inheritdoc */
+ toString(): string;
+}
diff --git a/node_modules/@oozcitak/url/lib/URLImpl.js b/node_modules/@oozcitak/url/lib/URLImpl.js
new file mode 100644
index 0000000..a0e8d0c
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/URLImpl.js
@@ -0,0 +1,377 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var URLSearchParamsImpl_1 = require("./URLSearchParamsImpl");
+var interfaces_1 = require("./interfaces");
+var URLAlgorithm_1 = require("./URLAlgorithm");
+/**
+ * Represents an URL.
+ */
+var URLImpl = /** @class */ (function () {
+ /**
+ * Initializes a new `URL`.
+ *
+ * @param url - an URL string
+ * @param base - a base URL string
+ */
+ function URLImpl(url, baseURL) {
+ /**
+ * 1. Let parsedBase be null.
+ * 2. If base is given, then:
+ * 2.1. Let parsedBase be the result of running the basic URL parser on base.
+ * 2.2. If parsedBase is failure, then throw a TypeError.
+ */
+ var parsedBase = null;
+ if (baseURL !== undefined) {
+ parsedBase = URLAlgorithm_1.basicURLParser(baseURL);
+ if (parsedBase === null) {
+ throw new TypeError("Invalid base URL: '" + baseURL + "'.");
+ }
+ }
+ /**
+ * 3. Let parsedURL be the result of running the basic URL parser on url
+ * with parsedBase.
+ * 4. If parsedURL is failure, then throw a TypeError.
+ */
+ var parsedURL = URLAlgorithm_1.basicURLParser(url, parsedBase);
+ if (parsedURL === null) {
+ throw new TypeError("Invalid URL: '" + url + "'.");
+ }
+ /**
+ * 5. Let query be parsedURL’s query, if that is non-null, and the empty
+ * string otherwise.
+ * 6. Let result be a new URL object.
+ * 7. Set result’s url to parsedURL.
+ * 8. Set result’s query object to a new URLSearchParams object using query,
+ * and then set that query object’s url object to result.
+ * 9. Return result.
+ */
+ var query = parsedURL.query || "";
+ this._url = parsedURL;
+ this._queryObject = new URLSearchParamsImpl_1.URLSearchParamsImpl(query);
+ this._queryObject._urlObject = this;
+ }
+ Object.defineProperty(URLImpl.prototype, "href", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The href attribute’s getter and the toJSON() method, when invoked, must
+ * return the serialization of context object’s url.
+ */
+ return URLAlgorithm_1.urlSerializer(this._url);
+ },
+ set: function (value) {
+ /**
+ * 1. Let parsedURL be the result of running the basic URL parser on the
+ * given value.
+ * 2. If parsedURL is failure, then throw a TypeError.
+ */
+ var parsedURL = URLAlgorithm_1.basicURLParser(value);
+ if (parsedURL === null) {
+ throw new TypeError("Invalid URL: '" + value + "'.");
+ }
+ /**
+ * 3. Set context object’s url to parsedURL.
+ * 4. Empty context object’s query object’s list.
+ * 5. Let query be context object’s url’s query.
+ * 6. If query is non-null, then set context object’s query object’s list to
+ * the result of parsing query.
+ */
+ this._url = parsedURL;
+ this._queryObject._list = [];
+ var query = this._url.query;
+ if (query !== null) {
+ this._queryObject._list = URLAlgorithm_1.urlEncodedStringParser(query);
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(URLImpl.prototype, "origin", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The origin attribute’s getter must return the serialization of context
+ * object’s url’s origin. [HTML]
+ */
+ return URLAlgorithm_1.asciiSerializationOfAnOrigin(URLAlgorithm_1.origin(this._url));
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(URLImpl.prototype, "protocol", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The protocol attribute’s getter must return context object url’s scheme,
+ * followed by U+003A (:).
+ */
+ return this._url.scheme + ':';
+ },
+ set: function (val) {
+ /**
+ * The protocol attribute’s setter must basic URL parse the given value,
+ * followed by U+003A (:), with context object’s url as url and scheme start
+ * state as state override.
+ */
+ URLAlgorithm_1.basicURLParser(val + ':', undefined, undefined, this._url, interfaces_1.ParserState.SchemeStart);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(URLImpl.prototype, "username", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The username attribute’s getter must return context object’s url’s
+ * username.
+ */
+ return this._url.username;
+ },
+ set: function (val) {
+ /**
+ * 1. If context object’s url cannot have a username/password/port, then
+ * return.
+ * 2. Set the username given context object’s url and the given value.
+ */
+ if (URLAlgorithm_1.cannotHaveAUsernamePasswordPort(this._url))
+ return;
+ URLAlgorithm_1.setTheUsername(this._url, val);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(URLImpl.prototype, "password", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * The password attribute’s getter must return context object’s url’s
+ * password.
+ */
+ return this._url.password;
+ },
+ set: function (val) {
+ /**
+ * 1. If context object’s url cannot have a username/password/port, then
+ * return.
+ * 2. Set the password given context object’s url and the given value.
+ */
+ if (URLAlgorithm_1.cannotHaveAUsernamePasswordPort(this._url))
+ return;
+ URLAlgorithm_1.setThePassword(this._url, val);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(URLImpl.prototype, "host", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * 1. Let url be context object’s url.
+ * 2. If url’s host is null, return the empty string.
+ * 3. If url’s port is null, return url’s host, serialized.
+ * 4. Return url’s host, serialized, followed by U+003A (:) and url’s port,
+ * serialized.
+ */
+ if (this._url.host === null) {
+ return "";
+ }
+ else if (this._url.port === null) {
+ return URLAlgorithm_1.hostSerializer(this._url.host);
+ }
+ else {
+ return URLAlgorithm_1.hostSerializer(this._url.host) + ':' + this._url.port.toString();
+ }
+ },
+ set: function (val) {
+ /**
+ * 1. If context object’s url’s cannot-be-a-base-URL flag is set, then
+ * return.
+ * 2. Basic URL parse the given value with context object’s url as url and
+ * host state as state override.
+ */
+ if (this._url._cannotBeABaseURLFlag)
+ return;
+ URLAlgorithm_1.basicURLParser(val, undefined, undefined, this._url, interfaces_1.ParserState.Host);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(URLImpl.prototype, "hostname", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * 1. If context object’s url’s host is null, return the empty string.
+ * 2. Return context object’s url’s host, serialized.
+ */
+ if (this._url.host === null)
+ return "";
+ return URLAlgorithm_1.hostSerializer(this._url.host);
+ },
+ set: function (val) {
+ /**
+ * 1. If context object’s url’s cannot-be-a-base-URL flag is set, then
+ * return.
+ * 2. Basic URL parse the given value with context object’s url as url and
+ * hostname state as state override.
+ */
+ if (this._url._cannotBeABaseURLFlag)
+ return;
+ URLAlgorithm_1.basicURLParser(val, undefined, undefined, this._url, interfaces_1.ParserState.Hostname);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(URLImpl.prototype, "port", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * 1. If context object’s url’s port is null, return the empty string.
+ * 2. Return context object’s url’s port, serialized.
+ */
+ if (this._url.port === null)
+ return "";
+ return this._url.port.toString();
+ },
+ set: function (val) {
+ /**
+ * 1. If context object’s url cannot have a username/password/port, then
+ * return.
+ * 2. If the given value is the empty string, then set context object’s
+ * url’s port to null.
+ * 3. Otherwise, basic URL parse the given value with context object’s url
+ * as url and port state as state override.
+ */
+ if (URLAlgorithm_1.cannotHaveAUsernamePasswordPort(this._url))
+ return;
+ if (val === "") {
+ this._url.port = null;
+ }
+ else {
+ URLAlgorithm_1.basicURLParser(val, undefined, undefined, this._url, interfaces_1.ParserState.Port);
+ }
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(URLImpl.prototype, "pathname", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * 1. If context object’s url’s cannot-be-a-base-URL flag is set, then
+ * return context object’s url’s path[0].
+ * 2. If context object’s url’s path is empty, then return the empty string.
+ * 3. Return U+002F (/), followed by the strings in context object’s url’s
+ * path (including empty strings), if any, separated from each other by
+ * U+002F (/).
+ */
+ if (this._url._cannotBeABaseURLFlag)
+ return this._url.path[0];
+ if (this._url.path.length === 0)
+ return "";
+ return '/' + this._url.path.join('/');
+ },
+ set: function (val) {
+ /**
+ * 1. If context object’s url’s cannot-be-a-base-URL flag is set, then return.
+ * 2. Empty context object’s url’s path.
+ * 3. Basic URL parse the given value with context object’s url as url and
+ * path start state as state override.
+ */
+ if (this._url._cannotBeABaseURLFlag)
+ return;
+ this._url.path = [];
+ URLAlgorithm_1.basicURLParser(val, undefined, undefined, this._url, interfaces_1.ParserState.PathStart);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(URLImpl.prototype, "search", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * 1. If context object’s url’s query is either null or the empty string,
+ * return the empty string.
+ * 2. Return U+003F (?), followed by context object’s url’s query.
+ */
+ if (this._url.query === null || this._url.query === "")
+ return "";
+ return '?' + this._url.query;
+ },
+ set: function (val) {
+ /**
+ * 1. Let url be context object’s url.
+ * 2. If the given value is the empty string, set url’s query to null,
+ * empty context object’s query object’s list, and then return.
+ * 3. Let input be the given value with a single leading U+003F (?) removed,
+ * if any.
+ * 4. Set url’s query to the empty string.
+ * 5. Basic URL parse input with url as url and query state as state
+ * override.
+ * 6. Set context object’s query object’s list to the result of parsing
+ * input.
+ */
+ var url = this._url;
+ if (val === "") {
+ url.query = null;
+ this._queryObject._list.length = 0;
+ return;
+ }
+ if (val.startsWith('?'))
+ val = val.substr(1);
+ url.query = "";
+ URLAlgorithm_1.basicURLParser(val, undefined, undefined, url, interfaces_1.ParserState.Query);
+ this._queryObject._list = URLAlgorithm_1.urlEncodedStringParser(val);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(URLImpl.prototype, "searchParams", {
+ /** @inheritdoc */
+ get: function () { return this._queryObject; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(URLImpl.prototype, "hash", {
+ /** @inheritdoc */
+ get: function () {
+ /**
+ * 1. If context object’s url’s fragment is either null or the empty string,
+ * return the empty string.
+ * 2. Return U+0023 (#), followed by context object’s url’s fragment.
+ */
+ if (this._url.fragment === null || this._url.fragment === "")
+ return "";
+ return '#' + this._url.fragment;
+ },
+ set: function (val) {
+ /**
+ * 1. If the given value is the empty string, then set context object’s
+ * url’s fragment to null and return.
+ * 2. Let input be the given value with a single leading U+0023 (#) removed,
+ * if any.
+ * 3. Set context object’s url’s fragment to the empty string.
+ * 4. Basic URL parse input with context object’s url as url and fragment
+ * state as state override.
+ */
+ if (val === "") {
+ this._url.fragment = null;
+ return;
+ }
+ if (val.startsWith('#'))
+ val = val.substr(1);
+ this._url.fragment = "";
+ URLAlgorithm_1.basicURLParser(val, undefined, undefined, this._url, interfaces_1.ParserState.Fragment);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ /** @inheritdoc */
+ URLImpl.prototype.toJSON = function () { return URLAlgorithm_1.urlSerializer(this._url); };
+ /** @inheritdoc */
+ URLImpl.prototype.toString = function () {
+ return this.href;
+ };
+ return URLImpl;
+}());
+exports.URLImpl = URLImpl;
+//# sourceMappingURL=URLImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/url/lib/URLImpl.js.map b/node_modules/@oozcitak/url/lib/URLImpl.js.map
new file mode 100644
index 0000000..e4ac5a9
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/URLImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"URLImpl.js","sourceRoot":"","sources":["../src/URLImpl.ts"],"names":[],"mappings":";;AAAA,6DAA2D;AAC3D,2CAA2E;AAC3E,+CAIuB;AAEvB;;GAEG;AACH;IAKE;;;;;OAKG;IACH,iBAAY,GAAW,EAAE,OAAgB;QACvC;;;;;WAKG;QACH,IAAI,UAAU,GAAqB,IAAI,CAAA;QACvC,IAAI,OAAO,KAAK,SAAS,EAAE;YACzB,UAAU,GAAG,6BAAc,CAAC,OAAO,CAAC,CAAA;YACpC,IAAI,UAAU,KAAK,IAAI,EAAE;gBACvB,MAAM,IAAI,SAAS,CAAC,wBAAsB,OAAO,OAAI,CAAC,CAAA;aACvD;SACF;QAED;;;;WAIG;QACH,IAAM,SAAS,GAAG,6BAAc,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;QACjD,IAAI,SAAS,KAAK,IAAI,EAAE;YACtB,MAAM,IAAI,SAAS,CAAC,mBAAiB,GAAG,OAAI,CAAC,CAAA;SAC9C;QAED;;;;;;;;WAQG;QACH,IAAM,KAAK,GAAG,SAAS,CAAC,KAAK,IAAI,EAAE,CAAA;QACnC,IAAI,CAAC,IAAI,GAAG,SAAS,CAAA;QACrB,IAAI,CAAC,YAAY,GAAG,IAAI,yCAAmB,CAAC,KAAK,CAAC,CAAA;QAClD,IAAI,CAAC,YAAY,CAAC,UAAU,GAAG,IAAI,CAAA;IACrC,CAAC;IAGD,sBAAI,yBAAI;QADR,kBAAkB;aAClB;YACE;;;eAGG;YACH,OAAO,4BAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACjC,CAAC;aACD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Q,KAAK,EAAE;gBAAE,OAAO,EAAE,CAAA;YACvE,OAAO,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAA;QACjC,CAAC;aACD,UAAS,GAAW;YAClB;;;;;;;;eAQG;YACH,IAAI,GAAG,KAAK,EAAE,EAAE;gBACd,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;gBACzB,OAAM;aACP;YACD,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;gBAAE,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;YAC5C,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;YACvB,6BAAc,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,EACjD,wBAAW,CAAC,QAAQ,CAAC,CAAA;QACzB,CAAC;;;OAnBA;IAsBD,kBAAkB;IAClB,wBAAM,GAAN,cAAmB,OAAO,4BAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC;IAEpD,kBAAkB;IAClB,0BAAQ,GAAR;QACE,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IAEH,cAAC;AAAD,CAAC,AAxUD,IAwUC;AAxUY,0BAAO"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.d.ts b/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.d.ts
new file mode 100644
index 0000000..546a8e7
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.d.ts
@@ -0,0 +1,38 @@
+import { URLSearchParams, URL } from "./interfaces";
+/**
+ * Represents URL query parameters.
+ */
+export declare class URLSearchParamsImpl implements URLSearchParams {
+ _list: [string, string][];
+ _urlObject: URL | null;
+ /**
+ * Initializes a new `URLSearchParams`.
+ *
+ * @param init - initial values of query parameters
+ */
+ constructor(init?: string[][] | {
+ [key: string]: string;
+ } | string);
+ /**
+ * Runs the update steps.
+ */
+ _updateSteps(): void;
+ /** @inheritdoc */
+ append(name: string, value: string): void;
+ /** @inheritdoc */
+ delete(name: string): void;
+ /** @inheritdoc */
+ get(name: string): string | null;
+ /** @inheritdoc */
+ getAll(name: string): string[];
+ /** @inheritdoc */
+ has(name: string): boolean;
+ /** @inheritdoc */
+ set(name: string, value: string): void;
+ /** @inheritdoc */
+ sort(): void;
+ /** @inheritdoc */
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ /** @inheritdoc */
+ toString(): string;
+}
diff --git a/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js b/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js
new file mode 100644
index 0000000..b7d55ac
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js
@@ -0,0 +1,303 @@
+"use strict";
+var __generator = (this && this.__generator) || function (thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (_) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+};
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var util_1 = require("@oozcitak/util");
+var URLAlgorithm_1 = require("./URLAlgorithm");
+/**
+ * Represents URL query parameters.
+ */
+var URLSearchParamsImpl = /** @class */ (function () {
+ /**
+ * Initializes a new `URLSearchParams`.
+ *
+ * @param init - initial values of query parameters
+ */
+ function URLSearchParamsImpl(init) {
+ var e_1, _a;
+ if (init === void 0) { init = ""; }
+ this._list = [];
+ this._urlObject = null;
+ /**
+ * 1. Let query be a new URLSearchParams object.
+ * 2. If init is a sequence, then for each pair in init:
+ * 3. If pair does not contain exactly two items, then throw a TypeError.
+ * 4. Append a new name-value pair whose name is pair’s first item, and
+ * value is pair’s second item, to query’s list.
+ * 5. Otherwise, if init is a record, then for each name → value in init,
+ * append a new name-value pair whose name is name and value is value, to
+ * query’s list.
+ * 6. Otherwise, init is a string, then set query’s list to the result of
+ * parsing init.
+ * 7. Return query.
+ */
+ if (util_1.isArray(init)) {
+ try {
+ for (var init_1 = __values(init), init_1_1 = init_1.next(); !init_1_1.done; init_1_1 = init_1.next()) {
+ var item = init_1_1.value;
+ if (item.length !== 2) {
+ throw new TypeError("Each item of init must be a two-tuple.");
+ }
+ this._list.push([item[0], item[1]]);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (init_1_1 && !init_1_1.done && (_a = init_1.return)) _a.call(init_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ }
+ else if (util_1.isObject(init)) {
+ for (var name in init) {
+ /* istanbul ignore else */
+ if (init.hasOwnProperty(name)) {
+ this._list.push([name, init[name]]);
+ }
+ }
+ }
+ else {
+ this._list = URLAlgorithm_1.urlEncodedStringParser(init);
+ }
+ }
+ /**
+ * Runs the update steps.
+ */
+ URLSearchParamsImpl.prototype._updateSteps = function () {
+ /**
+ * 1. Let query be the serialization of URLSearchParams object’s list.
+ * 2. If query is the empty string, then set query to null.
+ * 3. Set url object’s url’s query to query.
+ */
+ var query = URLAlgorithm_1.urlEncodedSerializer(this._list);
+ if (query === "")
+ query = null;
+ if (this._urlObject !== null)
+ this._urlObject._url.query = query;
+ };
+ /** @inheritdoc */
+ URLSearchParamsImpl.prototype.append = function (name, value) {
+ /**
+ * 1. Append a new name-value pair whose name is name and value is value,
+ * to list.
+ * 2. Run the update steps.
+ */
+ this._list.push([name, value]);
+ this._updateSteps();
+ };
+ /** @inheritdoc */
+ URLSearchParamsImpl.prototype.delete = function (name) {
+ /**
+ * 1. Remove all name-value pairs whose name is name from list.
+ * 2. Run the update steps.
+ */
+ for (var i = this._list.length - 1; i >= 0; i--) {
+ if (this._list[i][0] === name)
+ this._list.splice(i, 1);
+ }
+ this._updateSteps();
+ };
+ /** @inheritdoc */
+ URLSearchParamsImpl.prototype.get = function (name) {
+ var e_2, _a;
+ try {
+ /**
+ * The get(name) method, when invoked, must return the value of the
+ * first name-value pair whose name is name in list, if there is such
+ * a pair, and null otherwise.
+ */
+ for (var _b = __values(this._list), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var item = _c.value;
+ if (item[0] === name)
+ return item[1];
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ return null;
+ };
+ /** @inheritdoc */
+ URLSearchParamsImpl.prototype.getAll = function (name) {
+ var e_3, _a;
+ /**
+ * The getAll(name) method, when invoked, must return the values of all
+ * name-value pairs whose name is name, in list, in list order, and the
+ * empty sequence otherwise.
+ */
+ var values = [];
+ try {
+ for (var _b = __values(this._list), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var item = _c.value;
+ if (item[0] === name)
+ values.push(item[1]);
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ return values;
+ };
+ /** @inheritdoc */
+ URLSearchParamsImpl.prototype.has = function (name) {
+ var e_4, _a;
+ try {
+ /**
+ * The has(name) method, when invoked, must return true if there is
+ * a name-value pair whose name is name in list, and false otherwise.
+ */
+ for (var _b = __values(this._list), _c = _b.next(); !_c.done; _c = _b.next()) {
+ var item = _c.value;
+ if (item[0] === name)
+ return true;
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+ return false;
+ };
+ /** @inheritdoc */
+ URLSearchParamsImpl.prototype.set = function (name, value) {
+ var e_5, _a;
+ /**
+ * 1. If there are any name-value pairs whose name is name, in list,
+ * set the value of the first such name-value pair to value and remove
+ * the others.
+ * 2. Otherwise, append a new name-value pair whose name is name and value
+ * is value, to list.
+ * 3. Run the update steps.
+ */
+ var toRemove = [];
+ var found = false;
+ for (var i = 0; i < this._list.length; i++) {
+ if (this._list[i][0] === name) {
+ if (!found) {
+ found = true;
+ this._list[i][1] = value;
+ }
+ else {
+ toRemove.push(i);
+ }
+ }
+ }
+ if (!found) {
+ this._list.push([name, value]);
+ }
+ try {
+ for (var toRemove_1 = __values(toRemove), toRemove_1_1 = toRemove_1.next(); !toRemove_1_1.done; toRemove_1_1 = toRemove_1.next()) {
+ var i = toRemove_1_1.value;
+ this._list.splice(i, 1);
+ }
+ }
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
+ finally {
+ try {
+ if (toRemove_1_1 && !toRemove_1_1.done && (_a = toRemove_1.return)) _a.call(toRemove_1);
+ }
+ finally { if (e_5) throw e_5.error; }
+ }
+ };
+ /** @inheritdoc */
+ URLSearchParamsImpl.prototype.sort = function () {
+ /**
+ * 1. Sort all name-value pairs, if any, by their names. Sorting must be
+ * done by comparison of code units. The relative order between name-value
+ * pairs with equal names must be preserved.
+ * 2. Run the update steps.
+ */
+ this._list.sort(function (a, b) { return (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0); });
+ this._updateSteps();
+ };
+ /** @inheritdoc */
+ URLSearchParamsImpl.prototype[Symbol.iterator] = function () {
+ var _a, _b, item, e_6_1;
+ var e_6, _c;
+ return __generator(this, function (_d) {
+ switch (_d.label) {
+ case 0:
+ _d.trys.push([0, 5, 6, 7]);
+ _a = __values(this._list), _b = _a.next();
+ _d.label = 1;
+ case 1:
+ if (!!_b.done) return [3 /*break*/, 4];
+ item = _b.value;
+ return [4 /*yield*/, item];
+ case 2:
+ _d.sent();
+ _d.label = 3;
+ case 3:
+ _b = _a.next();
+ return [3 /*break*/, 1];
+ case 4: return [3 /*break*/, 7];
+ case 5:
+ e_6_1 = _d.sent();
+ e_6 = { error: e_6_1 };
+ return [3 /*break*/, 7];
+ case 6:
+ try {
+ if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
+ }
+ finally { if (e_6) throw e_6.error; }
+ return [7 /*endfinally*/];
+ case 7: return [2 /*return*/];
+ }
+ });
+ };
+ /** @inheritdoc */
+ URLSearchParamsImpl.prototype.toString = function () {
+ return URLAlgorithm_1.urlEncodedSerializer(this._list);
+ };
+ return URLSearchParamsImpl;
+}());
+exports.URLSearchParamsImpl = URLSearchParamsImpl;
+//# sourceMappingURL=URLSearchParamsImpl.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js.map b/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js.map
new file mode 100644
index 0000000..2cbbd0a
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"URLSearchParamsImpl.js","sourceRoot":"","sources":["../src/URLSearchParamsImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAAkD;AAClD,+CAA6E;AAE7E;;GAEG;AACH;IAKE;;;;OAIG;IACH,6BAAY,IAA0D;;QAA1D,qBAAA,EAAA,SAA0D;QARtE,UAAK,GAAuB,EAAE,CAAA;QAC9B,eAAU,GAAe,IAAI,CAAA;QAQ3B;;;;;;;;;;;;WAYG;QACH,IAAI,cAAO,CAAC,IAAI,CAAC,EAAE;;gBACjB,KAAmB,IAAA,SAAA,SAAA,IAAI,CAAA,0BAAA,4CAAE;oBAApB,IAAM,IAAI,iBAAA;oBACb,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;wBACrB,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,CAAA;qBAC9D;oBACD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;iBACpC;;;;;;;;;SACF;aAAM,IAAI,eAAQ,CAAC,IAAI,CAAC,EAAE;YACzB,KAAK,IAAM,IAAI,IAAI,IAAI,EAAE;gBACvB,0BAA0B;gBAC1B,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;oBAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;iBACpC;aACF;SACF;aAAM;YACL,IAAI,CAAC,KAAK,G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AK,EAAE;YACV,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;SAC/B;;YACD,KAAgB,IAAA,aAAA,SAAA,QAAQ,CAAA,kCAAA,wDAAE;gBAArB,IAAM,CAAC,qBAAA;gBACV,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;aACxB;;;;;;;;;IACH,CAAC;IAED,kBAAkB;IAClB,kCAAI,GAAJ;QACE;;;;;WAKG;QACH,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAxC,CAAwC,CAAC,CAAA;QACnE,IAAI,CAAC,YAAY,EAAE,CAAA;IACrB,CAAC;IAED,kBAAkB;IACjB,8BAAC,MAAM,CAAC,QAAQ,CAAC,GAAlB;;;;;;;oBAKqB,KAAA,SAAA,IAAI,CAAC,KAAK,CAAA;;;;oBAAlB,IAAI;oBACb,qBAAM,IAAI,EAAA;;oBAAV,SAAU,CAAA;;;;;;;;;;;;;;;;;;;KAEb;IAED,kBAAkB;IAClB,sCAAQ,GAAR;QACE,OAAO,mCAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACzC,CAAC;IAEH,0BAAC;AAAD,CAAC,AAjLD,IAiLC;AAjLY,kDAAmB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/url/lib/index.d.ts b/node_modules/@oozcitak/url/lib/index.d.ts
new file mode 100644
index 0000000..7f0ca4f
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/index.d.ts
@@ -0,0 +1,2 @@
+export { URLImpl as URL } from "./URLImpl";
+export { URLSearchParamsImpl as URLSearchParams } from "./URLSearchParamsImpl";
diff --git a/node_modules/@oozcitak/url/lib/index.js b/node_modules/@oozcitak/url/lib/index.js
new file mode 100644
index 0000000..7218659
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/index.js
@@ -0,0 +1,7 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var URLImpl_1 = require("./URLImpl");
+exports.URL = URLImpl_1.URLImpl;
+var URLSearchParamsImpl_1 = require("./URLSearchParamsImpl");
+exports.URLSearchParams = URLSearchParamsImpl_1.URLSearchParamsImpl;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/url/lib/index.js.map b/node_modules/@oozcitak/url/lib/index.js.map
new file mode 100644
index 0000000..d7fd3d0
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,qCAA0C;AAAjC,wBAAA,OAAO,CAAO;AACvB,6DAA8E;AAArE,gDAAA,mBAAmB,CAAmB"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/url/lib/interfaces.d.ts b/node_modules/@oozcitak/url/lib/interfaces.d.ts
new file mode 100644
index 0000000..2e856b4
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/interfaces.d.ts
@@ -0,0 +1,195 @@
+/**
+ * Represents an URL.
+ */
+export interface URL {
+ /**
+ * Gets the serialization of url.
+ */
+ readonly href: string;
+ /**
+ * Gets the serialization of url's origin.
+ */
+ readonly origin: string;
+ /**
+ * Gets or sets the url's scheme, followed by `":"`.
+ */
+ protocol: string;
+ /**
+ * Gets or sets the url's username.
+ */
+ username: string;
+ /**
+ * Gets or sets the url's password.
+ */
+ password: string;
+ /**
+ * Gets or sets the url's host.
+ */
+ host: string;
+ /**
+ * Gets or sets the url's hostname.
+ */
+ hostname: string;
+ /**
+ * Gets or sets the url's port.
+ */
+ port: string;
+ /**
+ * Gets or sets the url's path name.
+ */
+ pathname: string;
+ /**
+ * Gets or sets the url's query string.
+ */
+ search: string;
+ /**
+ * Gets the url's query parameters.
+ */
+ readonly searchParams: URLSearchParams;
+ /**
+ * Gets or sets the url's hash.
+ */
+ hash: string;
+ /**
+ * Returns the serialization of url.
+ */
+ toJSON(): string;
+ _url: URLRecord;
+ _queryObject: URLSearchParams;
+}
+/**
+ * Represents an URL record.
+ */
+export interface URLRecord {
+ /**
+ * The type of URL
+ */
+ scheme: string;
+ /**
+ * Username
+ */
+ username: string;
+ /**
+ * Password
+ */
+ password: string;
+ /**
+ * Host
+ */
+ host: Host | null;
+ /**
+ * Port
+ */
+ port: number | null;
+ /**
+ * Path
+ */
+ path: string[];
+ /**
+ * Query string
+ */
+ query: string | null;
+ /**
+ * Fragment
+ */
+ fragment: string | null;
+ _cannotBeABaseURLFlag: boolean;
+ _blobURLEntry: any | null;
+}
+/**
+ * Represents URL query parameters.
+ */
+export interface URLSearchParams extends Iterable<[string, string]> {
+ /**
+ * Appends a new name/value pair to the query parameters.
+ *
+ * @param name - query string name
+ * @param value - query string value
+ */
+ append(name: string, value: string): void;
+ /**
+ * Removes all query parameters with the given name.
+ *
+ * @param name - query string name
+ */
+ delete(name: string): void;
+ /**
+ * Gets the value of the first query parameter with the given name.
+ *
+ * @param name - query string name
+ */
+ get(name: string): string | null;
+ /**
+ * Gets the values of all query parameters with the given name.
+ *
+ * @param name - query string name
+ */
+ getAll(name: string): string[];
+ /**
+ * Determines whether a query parameter with the given name exists.
+ *
+ * @param name - query string name
+ */
+ has(name: string): boolean;
+ /**
+ * Replaces all query parameter with the given name with the given value.
+ *
+ * @param name - query string name
+ * @param value - query string value
+ */
+ set(name: string, value: string): void;
+ /**
+ * Sorts all query parameters with their name.
+ */
+ sort(): void;
+ /**
+ * Converts query parameters to a string.
+ */
+ toString(): string;
+ _list: [string, string][];
+ _urlObject: URL | null;
+}
+/**
+ * Represents the state of the URL parser.
+ */
+export declare enum ParserState {
+ SchemeStart = 0,
+ Scheme = 1,
+ NoScheme = 2,
+ SpecialRelativeOrAuthority = 3,
+ PathOrAuthority = 4,
+ Relative = 5,
+ RelativeSlash = 6,
+ SpecialAuthoritySlashes = 7,
+ SpecialAuthorityIgnoreSlashes = 8,
+ Authority = 9,
+ Host = 10,
+ Hostname = 11,
+ Port = 12,
+ File = 13,
+ FileSlash = 14,
+ FileHost = 15,
+ PathStart = 16,
+ Path = 17,
+ CannotBeABaseURLPath = 18,
+ Query = 19,
+ Fragment = 20
+}
+/**
+ * Represents an URL's host as either of:
+ * - a domain as a string
+ * - an IPv4 address as a number
+ * - an IPv6 address as a list of eight numbers
+ * - an opaque host as a string
+ * - or an empty host the an empty string `""`
+ */
+export declare type Host = string | number | number[];
+/**
+ * Represents an origin as a tuple of:
+ * - A scheme (a scheme).
+ * - A host (a host).
+ * - A port (a port).
+ * - A domain (null or a domain). Null unless stated otherwise.
+ */
+export declare type Origin = [string, Host, number | null, string | null];
+export declare const OpaqueOrigin: Origin;
diff --git a/node_modules/@oozcitak/url/lib/interfaces.js b/node_modules/@oozcitak/url/lib/interfaces.js
new file mode 100644
index 0000000..94c83a1
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/interfaces.js
@@ -0,0 +1,31 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Represents the state of the URL parser.
+ */
+var ParserState;
+(function (ParserState) {
+ ParserState[ParserState["SchemeStart"] = 0] = "SchemeStart";
+ ParserState[ParserState["Scheme"] = 1] = "Scheme";
+ ParserState[ParserState["NoScheme"] = 2] = "NoScheme";
+ ParserState[ParserState["SpecialRelativeOrAuthority"] = 3] = "SpecialRelativeOrAuthority";
+ ParserState[ParserState["PathOrAuthority"] = 4] = "PathOrAuthority";
+ ParserState[ParserState["Relative"] = 5] = "Relative";
+ ParserState[ParserState["RelativeSlash"] = 6] = "RelativeSlash";
+ ParserState[ParserState["SpecialAuthoritySlashes"] = 7] = "SpecialAuthoritySlashes";
+ ParserState[ParserState["SpecialAuthorityIgnoreSlashes"] = 8] = "SpecialAuthorityIgnoreSlashes";
+ ParserState[ParserState["Authority"] = 9] = "Authority";
+ ParserState[ParserState["Host"] = 10] = "Host";
+ ParserState[ParserState["Hostname"] = 11] = "Hostname";
+ ParserState[ParserState["Port"] = 12] = "Port";
+ ParserState[ParserState["File"] = 13] = "File";
+ ParserState[ParserState["FileSlash"] = 14] = "FileSlash";
+ ParserState[ParserState["FileHost"] = 15] = "FileHost";
+ ParserState[ParserState["PathStart"] = 16] = "PathStart";
+ ParserState[ParserState["Path"] = 17] = "Path";
+ ParserState[ParserState["CannotBeABaseURLPath"] = 18] = "CannotBeABaseURLPath";
+ ParserState[ParserState["Query"] = 19] = "Query";
+ ParserState[ParserState["Fragment"] = 20] = "Fragment";
+})(ParserState = exports.ParserState || (exports.ParserState = {}));
+exports.OpaqueOrigin = ["", "", null, null];
+//# sourceMappingURL=interfaces.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/url/lib/interfaces.js.map b/node_modules/@oozcitak/url/lib/interfaces.js.map
new file mode 100644
index 0000000..cf697b3
--- /dev/null
+++ b/node_modules/@oozcitak/url/lib/interfaces.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";;AA6JA;;GAEG;AACH,IAAY,WAsBX;AAtBD,WAAY,WAAW;IACrB,2DAAW,CAAA;IACX,iDAAM,CAAA;IACN,qDAAQ,CAAA;IACR,yFAA0B,CAAA;IAC1B,mEAAe,CAAA;IACf,qDAAQ,CAAA;IACR,+DAAa,CAAA;IACb,mFAAuB,CAAA;IACvB,+FAA6B,CAAA;IAC7B,uDAAS,CAAA;IACT,8CAAI,CAAA;IACJ,sDAAQ,CAAA;IACR,8CAAI,CAAA;IACJ,8CAAI,CAAA;IACJ,wDAAS,CAAA;IACT,sDAAQ,CAAA;IACR,wDAAS,CAAA;IACT,8CAAI,CAAA;IACJ,8EAAoB,CAAA;IACpB,gDAAK,CAAA;IACL,sDAAQ,CAAA;AACV,CAAC,EAtBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAsBtB;AAoBY,QAAA,YAAY,GAAW,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/url/package.json b/node_modules/@oozcitak/url/package.json
new file mode 100644
index 0000000..8bc92dc
--- /dev/null
+++ b/node_modules/@oozcitak/url/package.json
@@ -0,0 +1,55 @@
+{
+ "name": "@oozcitak/url",
+ "version": "1.0.4",
+ "keywords": [
+ "url",
+ "whatwg"
+ ],
+ "homepage": "http://github.com/oozcitak/url",
+ "description": "An implementation of the URL Living Standard",
+ "author": "Ozgur Ozcitak ",
+ "contributors": [],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/oozcitak/url.git"
+ },
+ "bugs": {
+ "url": "http://github.com/oozcitak/url/issues"
+ },
+ "main": "./lib/index",
+ "types": "lib/index.d.ts",
+ "engines": {
+ "node": ">=8.0"
+ },
+ "files": [
+ "lib/**/*"
+ ],
+ "dependencies": {
+ "@oozcitak/util": "8.3.8",
+ "@oozcitak/infra": "1.0.8"
+ },
+ "devDependencies": {
+ "typescript": "*",
+ "jest": "*",
+ "ts-jest": "*",
+ "coveralls": "*",
+ "@types/node": "*",
+ "@types/jest": "*"
+ },
+ "jest": {
+ "transform": {
+ "^.+\\.tsx?$": "ts-jest"
+ },
+ "testRegex": "/test/.*\\.test\\.tsx?$",
+ "testEnvironment": "node",
+ "collectCoverageFrom": [
+ "src/**/*.{ts,tsx}"
+ ]
+ },
+ "scripts": {
+ "compile": "rm -rf ./lib && tsc --version && tsc",
+ "test": "npm run compile && jest --coverage",
+ "publish-public": "npm run test && npm publish --access public"
+ }
+}
diff --git a/node_modules/@oozcitak/util/LICENSE b/node_modules/@oozcitak/util/LICENSE
new file mode 100644
index 0000000..eee50f6
--- /dev/null
+++ b/node_modules/@oozcitak/util/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 Ozgur Ozcitak
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@oozcitak/util/README.md b/node_modules/@oozcitak/util/README.md
new file mode 100644
index 0000000..5ea9693
--- /dev/null
+++ b/node_modules/@oozcitak/util/README.md
@@ -0,0 +1,10 @@
+# util
+Utility functions used by [@oozcitak/dom](http://github.com/oozcitak/dom) and related packages.
+
+[![License](http://img.shields.io/npm/l/@oozcitak/util.svg?style=flat-square)](http://opensource.org/licenses/MIT)
+[![NPM Version](http://img.shields.io/npm/v/@oozcitak/util.svg?style=flat-square)](https://www.npmjs.com/package/@oozcitak/util)
+
+[![Travis Build Status](http://img.shields.io/travis/oozcitak/util.svg?style=flat-square)](http://travis-ci.org/oozcitak/util)
+[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/n7pq9g2n9eipuh98?svg=true)](https://ci.appveyor.com/project/oozcitak/util)
+[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/util.svg?style=flat-square)](https://david-dm.org/oozcitak/util)
+[![Code Coverage](https://img.shields.io/codecov/c/github/oozcitak/util?style=flat-square)](https://codecov.io/gh/oozcitak/util)
diff --git a/node_modules/@oozcitak/util/lib/CompareCache.d.ts b/node_modules/@oozcitak/util/lib/CompareCache.d.ts
new file mode 100644
index 0000000..cd825d8
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/CompareCache.d.ts
@@ -0,0 +1,32 @@
+/**
+ * Represents a cache for storing order between equal objects.
+ *
+ * This cache is used when an algorithm compares two objects and finds them to
+ * be equal but still needs to establish an order between those two objects.
+ * When two such objects `a` and `b` are passed to the `check` method, a random
+ * number is generated with `Math.random()`. If the random number is less than
+ * `0.5` it is assumed that `a < b` otherwise `a > b`. The random number along
+ * with `a` and `b` is stored in the cache, so that subsequent checks result
+ * in the same consistent result.
+ *
+ * The cache has a size limit which is defined on initialization.
+ */
+export declare class CompareCache {
+ private _limit;
+ private _items;
+ /**
+ * Initializes a new instance of `CompareCache`.
+ *
+ * @param limit - maximum number of items to keep in the cache. When the limit
+ * is exceeded the first item is removed from the cache.
+ */
+ constructor(limit?: number);
+ /**
+ * Compares and caches the given objects. Returns `true` if `objA < objB` and
+ * `false` otherwise.
+ *
+ * @param objA - an item to compare
+ * @param objB - an item to compare
+ */
+ check(objA: T, objB: T): boolean;
+}
diff --git a/node_modules/@oozcitak/util/lib/CompareCache.js b/node_modules/@oozcitak/util/lib/CompareCache.js
new file mode 100644
index 0000000..36cd621
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/CompareCache.js
@@ -0,0 +1,59 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Represents a cache for storing order between equal objects.
+ *
+ * This cache is used when an algorithm compares two objects and finds them to
+ * be equal but still needs to establish an order between those two objects.
+ * When two such objects `a` and `b` are passed to the `check` method, a random
+ * number is generated with `Math.random()`. If the random number is less than
+ * `0.5` it is assumed that `a < b` otherwise `a > b`. The random number along
+ * with `a` and `b` is stored in the cache, so that subsequent checks result
+ * in the same consistent result.
+ *
+ * The cache has a size limit which is defined on initialization.
+ */
+var CompareCache = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `CompareCache`.
+ *
+ * @param limit - maximum number of items to keep in the cache. When the limit
+ * is exceeded the first item is removed from the cache.
+ */
+ function CompareCache(limit) {
+ if (limit === void 0) { limit = 1000; }
+ this._items = new Map();
+ this._limit = limit;
+ }
+ /**
+ * Compares and caches the given objects. Returns `true` if `objA < objB` and
+ * `false` otherwise.
+ *
+ * @param objA - an item to compare
+ * @param objB - an item to compare
+ */
+ CompareCache.prototype.check = function (objA, objB) {
+ if (this._items.get(objA) === objB)
+ return true;
+ else if (this._items.get(objB) === objA)
+ return false;
+ var result = (Math.random() < 0.5);
+ if (result) {
+ this._items.set(objA, objB);
+ }
+ else {
+ this._items.set(objB, objA);
+ }
+ if (this._items.size > this._limit) {
+ var it_1 = this._items.keys().next();
+ /* istanbul ignore else */
+ if (!it_1.done) {
+ this._items.delete(it_1.value);
+ }
+ }
+ return result;
+ };
+ return CompareCache;
+}());
+exports.CompareCache = CompareCache;
+//# sourceMappingURL=CompareCache.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/util/lib/CompareCache.js.map b/node_modules/@oozcitak/util/lib/CompareCache.js.map
new file mode 100644
index 0000000..810e2b3
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/CompareCache.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"CompareCache.js","sourceRoot":"","sources":["../src/CompareCache.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;GAYG;AACH;IAKE;;;;;OAKG;IACH,sBAAmB,KAAoB;QAApB,sBAAA,EAAA,YAAoB;QAR/B,WAAM,GAAG,IAAI,GAAG,EAAQ,CAAA;QAS9B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;IACrB,CAAC;IAED;;;;;;OAMG;IACH,4BAAK,GAAL,UAAM,IAAO,EAAE,IAAO;QACpB,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI;YAChC,OAAO,IAAI,CAAA;aACR,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI;YACrC,OAAO,KAAK,CAAA;QAEd,IAAM,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAA;QACpC,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;SAC5B;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;SAC5B;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE;YAClC,IAAM,IAAE,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;YACpC,0BAA0B;YAC1B,IAAI,CAAC,IAAE,CAAC,IAAI,EAAE;gBACZ,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAE,CAAC,KAAK,CAAC,CAAA;aAC7B;SACF;QAED,OAAO,MAAM,CAAA;IACf,CAAC;IAEH,mBAAC;AAAD,CAAC,AA9CD,IA8CC;AA9CY,oCAAY"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/util/lib/FixedSizeSet.d.ts b/node_modules/@oozcitak/util/lib/FixedSizeSet.d.ts
new file mode 100644
index 0000000..23f6de5
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/FixedSizeSet.d.ts
@@ -0,0 +1,64 @@
+/**
+ * Represents a set of objects with a size limit.
+ */
+export declare class FixedSizeSet implements Set {
+ private _limit;
+ private _items;
+ /**
+ * Initializes a new instance of `FixedSizeSet`.
+ *
+ * @param limit - maximum number of items to keep in the set. When the limit
+ * is exceeded the first item is removed from the set.
+ */
+ constructor(limit?: number);
+ /**
+ * Adds a new item to the set.
+ *
+ * @param item - an item
+ */
+ add(item: T): this;
+ /**
+ * Removes an item from the set.
+ *
+ * @param item - an item
+ */
+ delete(item: T): boolean;
+ /**
+ * Determines if an item is in the set.
+ *
+ * @param item - an item
+ */
+ has(item: T): boolean;
+ /**
+ * Removes all items from the set.
+ */
+ clear(): void;
+ /**
+ * Gets the number of items in the set.
+ */
+ get size(): number;
+ /**
+ * Applies the given callback function to all elements of the set.
+ */
+ forEach(callback: (value: T, value2: T, set: Set) => void, thisArg?: any): void;
+ /**
+ * Iterates through the items in the set.
+ */
+ keys(): IterableIterator;
+ /**
+ * Iterates through the items in the set.
+ */
+ values(): IterableIterator;
+ /**
+ * Iterates through the items in the set.
+ */
+ entries(): IterableIterator<[T, T]>;
+ /**
+ * Iterates through the items in the set.
+ */
+ [Symbol.iterator](): IterableIterator;
+ /**
+ * Returns the string tag of the set.
+ */
+ get [Symbol.toStringTag](): string;
+}
diff --git a/node_modules/@oozcitak/util/lib/FixedSizeSet.js b/node_modules/@oozcitak/util/lib/FixedSizeSet.js
new file mode 100644
index 0000000..6cab7cb
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/FixedSizeSet.js
@@ -0,0 +1,174 @@
+"use strict";
+var __generator = (this && this.__generator) || function (thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (_) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+};
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Represents a set of objects with a size limit.
+ */
+var FixedSizeSet = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `FixedSizeSet`.
+ *
+ * @param limit - maximum number of items to keep in the set. When the limit
+ * is exceeded the first item is removed from the set.
+ */
+ function FixedSizeSet(limit) {
+ if (limit === void 0) { limit = 1000; }
+ this._items = new Set();
+ this._limit = limit;
+ }
+ /**
+ * Adds a new item to the set.
+ *
+ * @param item - an item
+ */
+ FixedSizeSet.prototype.add = function (item) {
+ this._items.add(item);
+ if (this._items.size > this._limit) {
+ var it_1 = this._items.values().next();
+ /* istanbul ignore else */
+ if (!it_1.done) {
+ this._items.delete(it_1.value);
+ }
+ }
+ return this;
+ };
+ /**
+ * Removes an item from the set.
+ *
+ * @param item - an item
+ */
+ FixedSizeSet.prototype.delete = function (item) {
+ return this._items.delete(item);
+ };
+ /**
+ * Determines if an item is in the set.
+ *
+ * @param item - an item
+ */
+ FixedSizeSet.prototype.has = function (item) {
+ return this._items.has(item);
+ };
+ /**
+ * Removes all items from the set.
+ */
+ FixedSizeSet.prototype.clear = function () {
+ this._items.clear();
+ };
+ Object.defineProperty(FixedSizeSet.prototype, "size", {
+ /**
+ * Gets the number of items in the set.
+ */
+ get: function () { return this._items.size; },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Applies the given callback function to all elements of the set.
+ */
+ FixedSizeSet.prototype.forEach = function (callback, thisArg) {
+ var _this = this;
+ this._items.forEach(function (e) { return callback.call(thisArg, e, e, _this); });
+ };
+ /**
+ * Iterates through the items in the set.
+ */
+ FixedSizeSet.prototype.keys = function () {
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0: return [5 /*yield**/, __values(this._items.keys())];
+ case 1:
+ _a.sent();
+ return [2 /*return*/];
+ }
+ });
+ };
+ /**
+ * Iterates through the items in the set.
+ */
+ FixedSizeSet.prototype.values = function () {
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0: return [5 /*yield**/, __values(this._items.values())];
+ case 1:
+ _a.sent();
+ return [2 /*return*/];
+ }
+ });
+ };
+ /**
+ * Iterates through the items in the set.
+ */
+ FixedSizeSet.prototype.entries = function () {
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0: return [5 /*yield**/, __values(this._items.entries())];
+ case 1:
+ _a.sent();
+ return [2 /*return*/];
+ }
+ });
+ };
+ /**
+ * Iterates through the items in the set.
+ */
+ FixedSizeSet.prototype[Symbol.iterator] = function () {
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0: return [5 /*yield**/, __values(this._items)];
+ case 1:
+ _a.sent();
+ return [2 /*return*/];
+ }
+ });
+ };
+ Object.defineProperty(FixedSizeSet.prototype, Symbol.toStringTag, {
+ /**
+ * Returns the string tag of the set.
+ */
+ get: function () {
+ return "FixedSizeSet";
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return FixedSizeSet;
+}());
+exports.FixedSizeSet = FixedSizeSet;
+//# sourceMappingURL=FixedSizeSet.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/util/lib/FixedSizeSet.js.map b/node_modules/@oozcitak/util/lib/FixedSizeSet.js.map
new file mode 100644
index 0000000..85b1e5f
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/FixedSizeSet.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"FixedSizeSet.js","sourceRoot":"","sources":["../src/FixedSizeSet.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH;IAKE;;;;;OAKG;IACH,sBAAmB,KAAoB;QAApB,sBAAA,EAAA,YAAoB;QAR/B,WAAM,GAAG,IAAI,GAAG,EAAK,CAAA;QAS3B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;IACrB,CAAC;IAED;;;;OAIG;IACH,0BAAG,GAAH,UAAI,IAAO;QACT,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACrB,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE;YAClC,IAAM,IAAE,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAA;YACtC,0BAA0B;YAC1B,IAAI,CAAC,IAAE,CAAC,IAAI,EAAE;gBACZ,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAE,CAAC,KAAK,CAAC,CAAA;aAC7B;SACF;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;OAIG;IACH,6BAAM,GAAN,UAAO,IAAO;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED;;;;OAIG;IACH,0BAAG,GAAH,UAAI,IAAO;QACT,OAAO,IAAI,CAAC,MAAM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util/lib/Lazy.d.ts b/node_modules/@oozcitak/util/lib/Lazy.d.ts
new file mode 100644
index 0000000..0c27b01
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/Lazy.d.ts
@@ -0,0 +1,18 @@
+/**
+ * Represents an object with lazy initialization.
+ */
+export declare class Lazy {
+ private _initialized;
+ private _initFunc;
+ private _value;
+ /**
+ * Initializes a new instance of `Lazy`.
+ *
+ * @param initFunc - initializer function
+ */
+ constructor(initFunc: () => T);
+ /**
+ * Gets the value of the object.
+ */
+ get value(): T;
+}
diff --git a/node_modules/@oozcitak/util/lib/Lazy.js b/node_modules/@oozcitak/util/lib/Lazy.js
new file mode 100644
index 0000000..b7d4201
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/Lazy.js
@@ -0,0 +1,34 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Represents an object with lazy initialization.
+ */
+var Lazy = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `Lazy`.
+ *
+ * @param initFunc - initializer function
+ */
+ function Lazy(initFunc) {
+ this._initialized = false;
+ this._value = undefined;
+ this._initFunc = initFunc;
+ }
+ Object.defineProperty(Lazy.prototype, "value", {
+ /**
+ * Gets the value of the object.
+ */
+ get: function () {
+ if (!this._initialized) {
+ this._value = this._initFunc();
+ this._initialized = true;
+ }
+ return this._value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return Lazy;
+}());
+exports.Lazy = Lazy;
+//# sourceMappingURL=Lazy.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/util/lib/Lazy.js.map b/node_modules/@oozcitak/util/lib/Lazy.js.map
new file mode 100644
index 0000000..562c89b
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/Lazy.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Lazy.js","sourceRoot":"","sources":["../src/Lazy.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH;IAME;;;;OAIG;IACH,cAAmB,QAAiB;QAT5B,iBAAY,GAAY,KAAK,CAAA;QAUnC,IAAI,CAAC,MAAM,GAAG,SAAgB,CAAA;QAC9B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;IAC3B,CAAC;IAKD,sBAAI,uBAAK;QAHT;;WAEG;aACH;YACE,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;gBACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;gBAC9B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAA;aACzB;YACD,OAAO,IAAI,CAAC,MAAM,CAAA;QACpB,CAAC;;;OAAA;IAEH,WAAC;AAAD,CAAC,AA3BD,IA2BC;AA3BY,oBAAI"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/util/lib/ObjectCache.d.ts b/node_modules/@oozcitak/util/lib/ObjectCache.d.ts
new file mode 100644
index 0000000..4d2ebdc
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/ObjectCache.d.ts
@@ -0,0 +1,71 @@
+/**
+ * Represents a cache of objects with a size limit.
+ */
+export declare class ObjectCache {
+ private _limit;
+ private _items;
+ /**
+ * Initializes a new instance of `ObjectCache`.
+ *
+ * @param limit - maximum number of items to keep in the cache. When the limit
+ * is exceeded the first item is removed from the cache.
+ */
+ constructor(limit?: number);
+ /**
+ * Gets an item from the cache.
+ *
+ * @param key - object key
+ */
+ get(key: TKey): TValue | undefined;
+ /**
+ * Adds a new item to the cache.
+ *
+ * @param key - object key
+ * @param value - object value
+ */
+ set(key: TKey, value: TValue): void;
+ /**
+ * Removes an item from the cache.
+ *
+ * @param item - an item
+ */
+ delete(key: TKey): boolean;
+ /**
+ * Determines if an item is in the cache.
+ *
+ * @param item - an item
+ */
+ has(key: TKey): boolean;
+ /**
+ * Removes all items from the cache.
+ */
+ clear(): void;
+ /**
+ * Gets the number of items in the cache.
+ */
+ get size(): number;
+ /**
+ * Applies the given callback function to all elements of the cache.
+ */
+ forEach(callback: (key: TKey, value: TValue) => void, thisArg?: any): void;
+ /**
+ * Iterates through the items in the set.
+ */
+ keys(): IterableIterator;
+ /**
+ * Iterates through the items in the set.
+ */
+ values(): IterableIterator;
+ /**
+ * Iterates through the items in the set.
+ */
+ entries(): IterableIterator<[TKey, TValue]>;
+ /**
+ * Iterates through the items in the set.
+ */
+ [Symbol.iterator](): IterableIterator<[TKey, TValue]>;
+ /**
+ * Returns the string tag of the cache.
+ */
+ get [Symbol.toStringTag](): string;
+}
diff --git a/node_modules/@oozcitak/util/lib/ObjectCache.js b/node_modules/@oozcitak/util/lib/ObjectCache.js
new file mode 100644
index 0000000..633ebaf
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/ObjectCache.js
@@ -0,0 +1,181 @@
+"use strict";
+var __generator = (this && this.__generator) || function (thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (_) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+};
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Represents a cache of objects with a size limit.
+ */
+var ObjectCache = /** @class */ (function () {
+ /**
+ * Initializes a new instance of `ObjectCache`.
+ *
+ * @param limit - maximum number of items to keep in the cache. When the limit
+ * is exceeded the first item is removed from the cache.
+ */
+ function ObjectCache(limit) {
+ if (limit === void 0) { limit = 1000; }
+ this._items = new Map();
+ this._limit = limit;
+ }
+ /**
+ * Gets an item from the cache.
+ *
+ * @param key - object key
+ */
+ ObjectCache.prototype.get = function (key) {
+ return this._items.get(key);
+ };
+ /**
+ * Adds a new item to the cache.
+ *
+ * @param key - object key
+ * @param value - object value
+ */
+ ObjectCache.prototype.set = function (key, value) {
+ this._items.set(key, value);
+ if (this._items.size > this._limit) {
+ var it_1 = this._items.keys().next();
+ /* istanbul ignore else */
+ if (!it_1.done) {
+ this._items.delete(it_1.value);
+ }
+ }
+ };
+ /**
+ * Removes an item from the cache.
+ *
+ * @param item - an item
+ */
+ ObjectCache.prototype.delete = function (key) {
+ return this._items.delete(key);
+ };
+ /**
+ * Determines if an item is in the cache.
+ *
+ * @param item - an item
+ */
+ ObjectCache.prototype.has = function (key) {
+ return this._items.has(key);
+ };
+ /**
+ * Removes all items from the cache.
+ */
+ ObjectCache.prototype.clear = function () {
+ this._items.clear();
+ };
+ Object.defineProperty(ObjectCache.prototype, "size", {
+ /**
+ * Gets the number of items in the cache.
+ */
+ get: function () { return this._items.size; },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Applies the given callback function to all elements of the cache.
+ */
+ ObjectCache.prototype.forEach = function (callback, thisArg) {
+ this._items.forEach(function (v, k) { return callback.call(thisArg, k, v); });
+ };
+ /**
+ * Iterates through the items in the set.
+ */
+ ObjectCache.prototype.keys = function () {
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0: return [5 /*yield**/, __values(this._items.keys())];
+ case 1:
+ _a.sent();
+ return [2 /*return*/];
+ }
+ });
+ };
+ /**
+ * Iterates through the items in the set.
+ */
+ ObjectCache.prototype.values = function () {
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0: return [5 /*yield**/, __values(this._items.values())];
+ case 1:
+ _a.sent();
+ return [2 /*return*/];
+ }
+ });
+ };
+ /**
+ * Iterates through the items in the set.
+ */
+ ObjectCache.prototype.entries = function () {
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0: return [5 /*yield**/, __values(this._items.entries())];
+ case 1:
+ _a.sent();
+ return [2 /*return*/];
+ }
+ });
+ };
+ /**
+ * Iterates through the items in the set.
+ */
+ ObjectCache.prototype[Symbol.iterator] = function () {
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0: return [5 /*yield**/, __values(this._items)];
+ case 1:
+ _a.sent();
+ return [2 /*return*/];
+ }
+ });
+ };
+ Object.defineProperty(ObjectCache.prototype, Symbol.toStringTag, {
+ /**
+ * Returns the string tag of the cache.
+ */
+ get: function () {
+ return "ObjectCache";
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return ObjectCache;
+}());
+exports.ObjectCache = ObjectCache;
+//# sourceMappingURL=ObjectCache.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/util/lib/ObjectCache.js.map b/node_modules/@oozcitak/util/lib/ObjectCache.js.map
new file mode 100644
index 0000000..9367786
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/ObjectCache.js.map
@@ -0,0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WAEG;aACH,cAAqB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAA,CAAC,CAAC;;;OAAA;IAE9C;;OAEG;IACH,6BAAO,GAAP,UAAQ,QAA4C,EAAE,OAAa;QACjE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,EAA5B,CAA4B,CAAC,CAAA;IAC7D,CAAC;IAED;;OAEG;IACF,0BAAI,GAAL;;;wBACE,sBAAA,SAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA,EAAA;;oBAAzB,SAAyB,CAAA;;;;KAC1B;IAED;;OAEG;IACF,4BAAM,GAAP;;;wBACE,sBAAA,SAAO,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAA,EAAA;;oBAA3B,SAA2B,CAAA;;;;KAC5B;IAED;;OAEG;IACF,6BAAO,GAAR;;;wBACE,sBAAA,SAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA,EAAA;;oBAA5B,SAA4B,CAAA;;;;KAC7B;IAED;;OAEG;IACF,sBAAC,MAAM,CAAC,QAAQ,CAAC,GAAlB;;;wBACE,sBAAA,SAAO,IAAI,CAAC,MAAM,CAAA,EAAA;;oBAAlB,SAAkB,CAAA;;;;KACnB;IAKD,sBAAI,uBAAC,MAAM,CAAC,WAAY;QAHxB;;WAEG;aACH;YACE,OAAO,aAAa,CAAA;QACtB,CAAC;;;OAAA;IAEH,kBAAC;AAAD,CAAC,AAjHD,IAiHC;AAjHY,kCAAW"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/util/lib/StringWalker.d.ts b/node_modules/@oozcitak/util/lib/StringWalker.d.ts
new file mode 100644
index 0000000..7cfeb10
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/StringWalker.d.ts
@@ -0,0 +1,49 @@
+/**
+ * Walks through the code points of a string.
+ */
+export declare class StringWalker {
+ private _chars;
+ private _length;
+ private _pointer;
+ private _codePoint;
+ private _c;
+ private _remaining;
+ private _substring;
+ /**
+ * Initializes a new `StringWalker`.
+ *
+ * @param input - input string
+ */
+ constructor(input: string);
+ /**
+ * Determines if the current position is beyond the end of string.
+ */
+ get eof(): boolean;
+ /**
+ * Returns the number of code points in the input string.
+ */
+ get length(): number;
+ /**
+ * Returns the current code point. Returns `-1` if the position is beyond
+ * the end of string.
+ */
+ codePoint(): number;
+ /**
+ * Returns the current character. Returns an empty string if the position is
+ * beyond the end of string.
+ */
+ c(): string;
+ /**
+ * Returns the remaining string.
+ */
+ remaining(): string;
+ /**
+ * Returns the substring from the current character to the end of string.
+ */
+ substring(): string;
+ /**
+ * Gets or sets the current position.
+ */
+ get pointer(): number;
+ set pointer(val: number);
+}
diff --git a/node_modules/@oozcitak/util/lib/StringWalker.js b/node_modules/@oozcitak/util/lib/StringWalker.js
new file mode 100644
index 0000000..0aa763b
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/StringWalker.js
@@ -0,0 +1,105 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Walks through the code points of a string.
+ */
+var StringWalker = /** @class */ (function () {
+ /**
+ * Initializes a new `StringWalker`.
+ *
+ * @param input - input string
+ */
+ function StringWalker(input) {
+ this._pointer = 0;
+ this._chars = Array.from(input);
+ this._length = this._chars.length;
+ }
+ Object.defineProperty(StringWalker.prototype, "eof", {
+ /**
+ * Determines if the current position is beyond the end of string.
+ */
+ get: function () { return this._pointer >= this._length; },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StringWalker.prototype, "length", {
+ /**
+ * Returns the number of code points in the input string.
+ */
+ get: function () { return this._length; },
+ enumerable: true,
+ configurable: true
+ });
+ /**
+ * Returns the current code point. Returns `-1` if the position is beyond
+ * the end of string.
+ */
+ StringWalker.prototype.codePoint = function () {
+ if (this._codePoint === undefined) {
+ if (this.eof) {
+ this._codePoint = -1;
+ }
+ else {
+ var cp = this._chars[this._pointer].codePointAt(0);
+ /* istanbul ignore else */
+ if (cp !== undefined) {
+ this._codePoint = cp;
+ }
+ else {
+ this._codePoint = -1;
+ }
+ }
+ }
+ return this._codePoint;
+ };
+ /**
+ * Returns the current character. Returns an empty string if the position is
+ * beyond the end of string.
+ */
+ StringWalker.prototype.c = function () {
+ if (this._c === undefined) {
+ this._c = (this.eof ? "" : this._chars[this._pointer]);
+ }
+ return this._c;
+ };
+ /**
+ * Returns the remaining string.
+ */
+ StringWalker.prototype.remaining = function () {
+ if (this._remaining === undefined) {
+ this._remaining = (this.eof ?
+ "" : this._chars.slice(this._pointer + 1).join(''));
+ }
+ return this._remaining;
+ };
+ /**
+ * Returns the substring from the current character to the end of string.
+ */
+ StringWalker.prototype.substring = function () {
+ if (this._substring === undefined) {
+ this._substring = (this.eof ?
+ "" : this._chars.slice(this._pointer).join(''));
+ }
+ return this._substring;
+ };
+ Object.defineProperty(StringWalker.prototype, "pointer", {
+ /**
+ * Gets or sets the current position.
+ */
+ get: function () { return this._pointer; },
+ set: function (val) {
+ if (val === this._pointer)
+ return;
+ this._pointer = val;
+ this._codePoint = undefined;
+ this._c = undefined;
+ this._remaining = undefined;
+ this._substring = undefined;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ return StringWalker;
+}());
+exports.StringWalker = StringWalker;
+//# sourceMappingURL=StringWalker.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/util/lib/StringWalker.js.map b/node_modules/@oozcitak/util/lib/StringWalker.js.map
new file mode 100644
index 0000000..7489f83
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/StringWalker.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"StringWalker.js","sourceRoot":"","sources":["../src/StringWalker.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH;IAUE;;;;OAIG;IACH,sBAAY,KAAa;QAXjB,aAAQ,GAAW,CAAC,CAAA;QAY1B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,CA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C,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC3B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;SACtD;QACD,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAED;;OAEG;IACH,gCAAS,GAAT;QACE,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE;YACjC,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC3B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;SAClD;QACD,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAKD,sBAAI,iCAAO;QAHX;;WAEG;aACH,cAAyB,OAAO,IAAI,CAAC,QAAQ,CAAA,CAAC,CAAC;aAC/C,UAAY,GAAW;YACrB,IAAI,GAAG,KAAK,IAAI,CAAC,QAAQ;gBAAE,OAAM;YAEjC,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAA;YAEnB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;YAC3B,IAAI,CAAC,EAAE,GAAG,SAAS,CAAA;YACnB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;YAC3B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;QAC7B,CAAC;;;OAV8C;IAWjD,mBAAC;AAAD,CAAC,AAlGD,IAkGC;AAlGY,oCAAY"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/util/lib/index.d.ts b/node_modules/@oozcitak/util/lib/index.d.ts
new file mode 100644
index 0000000..3ecd8a0
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/index.d.ts
@@ -0,0 +1,178 @@
+export { FixedSizeSet } from './FixedSizeSet';
+export { ObjectCache } from './ObjectCache';
+export { CompareCache } from './CompareCache';
+export { Lazy } from './Lazy';
+export { StringWalker } from './StringWalker';
+/**
+ * Applies the mixin to a given class.
+ *
+ * @param baseClass - class to receive the mixin
+ * @param mixinClass - mixin class
+ * @param overrides - an array with names of function overrides. Base class
+ * functions whose names are in this array will be kept by prepending an
+ * underscore to their names.
+ */
+export declare function applyMixin(baseClass: any, mixinClass: any, ...overrides: string[]): void;
+/**
+ * Applies default values to the given object.
+ *
+ * @param obj - an object
+ * @param defaults - an object with default values
+ * @param overwrite - if set to `true` defaults object always overwrites object
+ * values, whether they are `undefined` or not.
+ */
+export declare function applyDefaults(obj: {
+ [key: string]: any;
+} | undefined, defaults: {
+ [key: string]: any;
+}, overwrite?: boolean): {
+ [key: string]: any;
+};
+/**
+ * Iterates over items of an array or set.
+ *
+ * @param arr - array or set to iterate
+ * @param callback - a callback function which receives each array item as its
+ * single argument
+ * @param thisArg - the value of this inside callback
+ */
+export declare function forEachArray(arr: Array | Set, callback: ((item: T) => void), thisArg?: any): void;
+/**
+ * Iterates over key/value pairs of a map or object.
+ *
+ * @param obj - map or object to iterate
+ * @param callback - a callback function which receives object key as its first
+ * argument and object value as its second argument
+ * @param thisArg - the value of this inside callback
+ */
+export declare function forEachObject(obj: Map | {
+ [key: string]: T;
+}, callback: ((key: string, item: T) => void), thisArg?: any): void;
+/**
+ * Returns the number of entries in an array or set.
+ *
+ * @param arr - array or set
+ */
+export declare function arrayLength(obj: any[] | Set): number;
+/**
+ * Returns the number of entries in a map or object.
+ *
+ * @param obj - map or object
+ */
+export declare function objectLength(obj: Map | {
+ [key: string]: any;
+}): number;
+/**
+ * Gets the value of a key from a map or object.
+ *
+ * @param obj - map or object
+ * @param key - the key to retrieve
+ */
+export declare function getObjectValue(obj: Map | {
+ [key: string]: T;
+}, key: string): T | undefined;
+/**
+ * Removes a property from a map or object.
+ *
+ * @param obj - map or object
+ * @param key - the key to remove
+ */
+export declare function removeObjectValue(obj: Map | {
+ [key: string]: T;
+}, key: string): void;
+/**
+ * Deep clones the given object.
+ *
+ * @param obj - an object
+ */
+export declare function clone(obj: T): T;
+/**
+ * Type guard for boolean types
+ *
+ * @param x - a variable to type check
+ */
+export declare function isBoolean(x: any): x is boolean;
+/**
+ * Type guard for numeric types
+ *
+ * @param x - a variable to type check
+ */
+export declare function isNumber(x: any): x is number;
+/**
+ * Type guard for strings
+ *
+ * @param x - a variable to type check
+ */
+export declare function isString(x: any): x is string;
+/**
+ * Type guard for function objects
+ *
+ * @param x - a variable to type check
+ */
+export declare function isFunction(x: any): x is Function;
+/**
+ * Type guard for JS objects
+ *
+ * _Note:_ Functions are objects too
+ *
+ * @param x - a variable to type check
+ */
+export declare function isObject(x: any): x is {
+ [key: string]: any;
+};
+/**
+ * Type guard for arrays
+ *
+ * @param x - a variable to type check
+ */
+export declare function isArray(x: any): x is any[];
+/**
+ * Type guard for sets.
+ *
+ * @param x - a variable to check
+ */
+export declare function isSet(x: any): x is Set;
+/**
+ * Type guard for maps.
+ *
+ * @param x - a variable to check
+ */
+export declare function isMap(x: any): x is Map;
+/**
+ * Determines if `x` is an empty Array or an Object with no own properties.
+ *
+ * @param x - a variable to check
+ */
+export declare function isEmpty(x: any): boolean;
+/**
+ * Determines if `x` is a plain Object.
+ *
+ * @param x - a variable to check
+ */
+export declare function isPlainObject(x: any): x is {
+ [key: string]: any;
+};
+/**
+ * Determines if `x` is an iterable Object.
+ *
+ * @param x - a variable to check
+ */
+export declare function isIterable(x: any): boolean;
+/**
+ * Gets the primitive value of an object.
+ */
+export declare function getValue(obj: any): any;
+/**
+ * UTF-8 encodes the given string.
+ *
+ * @param input - a string
+ */
+export declare function utf8Encode(input: string): Uint8Array;
+/**
+ * UTF-8 decodes the given byte sequence into a string.
+ *
+ * @param bytes - a byte sequence
+ */
+export declare function utf8Decode(bytes: Uint8Array): string;
diff --git a/node_modules/@oozcitak/util/lib/index.js b/node_modules/@oozcitak/util/lib/index.js
new file mode 100644
index 0000000..595e817
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/index.js
@@ -0,0 +1,439 @@
+"use strict";
+var __values = (this && this.__values) || function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var FixedSizeSet_1 = require("./FixedSizeSet");
+exports.FixedSizeSet = FixedSizeSet_1.FixedSizeSet;
+var ObjectCache_1 = require("./ObjectCache");
+exports.ObjectCache = ObjectCache_1.ObjectCache;
+var CompareCache_1 = require("./CompareCache");
+exports.CompareCache = CompareCache_1.CompareCache;
+var Lazy_1 = require("./Lazy");
+exports.Lazy = Lazy_1.Lazy;
+var StringWalker_1 = require("./StringWalker");
+exports.StringWalker = StringWalker_1.StringWalker;
+/**
+ * Applies the mixin to a given class.
+ *
+ * @param baseClass - class to receive the mixin
+ * @param mixinClass - mixin class
+ * @param overrides - an array with names of function overrides. Base class
+ * functions whose names are in this array will be kept by prepending an
+ * underscore to their names.
+ */
+function applyMixin(baseClass, mixinClass) {
+ var overrides = [];
+ for (var _i = 2; _i < arguments.length; _i++) {
+ overrides[_i - 2] = arguments[_i];
+ }
+ Object.getOwnPropertyNames(mixinClass.prototype).forEach(function (name) {
+ if (name !== "constructor") {
+ if (overrides.indexOf(name) !== -1) {
+ var orgPropDesc = Object.getOwnPropertyDescriptor(baseClass.prototype, name);
+ /* istanbul ignore else */
+ if (orgPropDesc) {
+ Object.defineProperty(baseClass.prototype, "_" + name, orgPropDesc);
+ }
+ }
+ var propDesc = Object.getOwnPropertyDescriptor(mixinClass.prototype, name);
+ /* istanbul ignore else */
+ if (propDesc) {
+ Object.defineProperty(baseClass.prototype, name, propDesc);
+ }
+ }
+ });
+}
+exports.applyMixin = applyMixin;
+/**
+ * Applies default values to the given object.
+ *
+ * @param obj - an object
+ * @param defaults - an object with default values
+ * @param overwrite - if set to `true` defaults object always overwrites object
+ * values, whether they are `undefined` or not.
+ */
+function applyDefaults(obj, defaults, overwrite) {
+ if (overwrite === void 0) { overwrite = false; }
+ var result = clone(obj || {});
+ forEachObject(defaults, function (key, val) {
+ if (isPlainObject(val)) {
+ result[key] = applyDefaults(result[key], val, overwrite);
+ }
+ else if (overwrite || result[key] === undefined) {
+ result[key] = val;
+ }
+ });
+ return result;
+}
+exports.applyDefaults = applyDefaults;
+/**
+ * Iterates over items of an array or set.
+ *
+ * @param arr - array or set to iterate
+ * @param callback - a callback function which receives each array item as its
+ * single argument
+ * @param thisArg - the value of this inside callback
+ */
+function forEachArray(arr, callback, thisArg) {
+ arr.forEach(callback, thisArg);
+}
+exports.forEachArray = forEachArray;
+/**
+ * Iterates over key/value pairs of a map or object.
+ *
+ * @param obj - map or object to iterate
+ * @param callback - a callback function which receives object key as its first
+ * argument and object value as its second argument
+ * @param thisArg - the value of this inside callback
+ */
+function forEachObject(obj, callback, thisArg) {
+ if (isMap(obj)) {
+ obj.forEach(function (value, key) { return callback.call(thisArg, key, value); });
+ }
+ else {
+ for (var key in obj) {
+ /* istanbul ignore else */
+ if (obj.hasOwnProperty(key)) {
+ callback.call(thisArg, key, obj[key]);
+ }
+ }
+ }
+}
+exports.forEachObject = forEachObject;
+/**
+ * Returns the number of entries in an array or set.
+ *
+ * @param arr - array or set
+ */
+function arrayLength(obj) {
+ if (isSet(obj)) {
+ return obj.size;
+ }
+ else {
+ return obj.length;
+ }
+}
+exports.arrayLength = arrayLength;
+/**
+ * Returns the number of entries in a map or object.
+ *
+ * @param obj - map or object
+ */
+function objectLength(obj) {
+ if (isMap(obj)) {
+ return obj.size;
+ }
+ else {
+ return Object.keys(obj).length;
+ }
+}
+exports.objectLength = objectLength;
+/**
+ * Gets the value of a key from a map or object.
+ *
+ * @param obj - map or object
+ * @param key - the key to retrieve
+ */
+function getObjectValue(obj, key) {
+ if (isMap(obj)) {
+ return obj.get(key);
+ }
+ else {
+ return obj[key];
+ }
+}
+exports.getObjectValue = getObjectValue;
+/**
+ * Removes a property from a map or object.
+ *
+ * @param obj - map or object
+ * @param key - the key to remove
+ */
+function removeObjectValue(obj, key) {
+ if (isMap(obj)) {
+ obj.delete(key);
+ }
+ else {
+ delete obj[key];
+ }
+}
+exports.removeObjectValue = removeObjectValue;
+/**
+ * Deep clones the given object.
+ *
+ * @param obj - an object
+ */
+function clone(obj) {
+ var e_1, _a;
+ if (isFunction(obj)) {
+ return obj;
+ }
+ else if (isArray(obj)) {
+ var result = [];
+ try {
+ for (var obj_1 = __values(obj), obj_1_1 = obj_1.next(); !obj_1_1.done; obj_1_1 = obj_1.next()) {
+ var item = obj_1_1.value;
+ result.push(clone(item));
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (obj_1_1 && !obj_1_1.done && (_a = obj_1.return)) _a.call(obj_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ return result;
+ }
+ else if (isObject(obj)) {
+ var result = {};
+ for (var key in obj) {
+ /* istanbul ignore next */
+ if (obj.hasOwnProperty(key)) {
+ var val = obj[key];
+ result[key] = clone(val);
+ }
+ }
+ return result;
+ }
+ else {
+ return obj;
+ }
+}
+exports.clone = clone;
+/**
+ * Type guard for boolean types
+ *
+ * @param x - a variable to type check
+ */
+function isBoolean(x) {
+ return typeof x === "boolean";
+}
+exports.isBoolean = isBoolean;
+/**
+ * Type guard for numeric types
+ *
+ * @param x - a variable to type check
+ */
+function isNumber(x) {
+ return typeof x === "number";
+}
+exports.isNumber = isNumber;
+/**
+ * Type guard for strings
+ *
+ * @param x - a variable to type check
+ */
+function isString(x) {
+ return typeof x === "string";
+}
+exports.isString = isString;
+/**
+ * Type guard for function objects
+ *
+ * @param x - a variable to type check
+ */
+function isFunction(x) {
+ return !!x && Object.prototype.toString.call(x) === '[object Function]';
+}
+exports.isFunction = isFunction;
+/**
+ * Type guard for JS objects
+ *
+ * _Note:_ Functions are objects too
+ *
+ * @param x - a variable to type check
+ */
+function isObject(x) {
+ var type = typeof x;
+ return !!x && (type === 'function' || type === 'object');
+}
+exports.isObject = isObject;
+/**
+ * Type guard for arrays
+ *
+ * @param x - a variable to type check
+ */
+function isArray(x) {
+ return Array.isArray(x);
+}
+exports.isArray = isArray;
+/**
+ * Type guard for sets.
+ *
+ * @param x - a variable to check
+ */
+function isSet(x) {
+ return x instanceof Set;
+}
+exports.isSet = isSet;
+/**
+ * Type guard for maps.
+ *
+ * @param x - a variable to check
+ */
+function isMap(x) {
+ return x instanceof Map;
+}
+exports.isMap = isMap;
+/**
+ * Determines if `x` is an empty Array or an Object with no own properties.
+ *
+ * @param x - a variable to check
+ */
+function isEmpty(x) {
+ if (isArray(x)) {
+ return !x.length;
+ }
+ else if (isSet(x)) {
+ return !x.size;
+ }
+ else if (isMap(x)) {
+ return !x.size;
+ }
+ else if (isObject(x)) {
+ for (var key in x) {
+ if (x.hasOwnProperty(key)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ return false;
+}
+exports.isEmpty = isEmpty;
+/**
+ * Determines if `x` is a plain Object.
+ *
+ * @param x - a variable to check
+ */
+function isPlainObject(x) {
+ if (isObject(x)) {
+ var proto = Object.getPrototypeOf(x);
+ var ctor = proto.constructor;
+ return proto && ctor &&
+ (typeof ctor === 'function') && (ctor instanceof ctor) &&
+ (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));
+ }
+ return false;
+}
+exports.isPlainObject = isPlainObject;
+/**
+ * Determines if `x` is an iterable Object.
+ *
+ * @param x - a variable to check
+ */
+function isIterable(x) {
+ return x && (typeof x[Symbol.iterator] === 'function');
+}
+exports.isIterable = isIterable;
+/**
+ * Gets the primitive value of an object.
+ */
+function getValue(obj) {
+ if (isFunction(obj.valueOf)) {
+ return obj.valueOf();
+ }
+ else {
+ return obj;
+ }
+}
+exports.getValue = getValue;
+/**
+ * UTF-8 encodes the given string.
+ *
+ * @param input - a string
+ */
+function utf8Encode(input) {
+ var bytes = new Uint8Array(input.length * 4);
+ var byteIndex = 0;
+ for (var i = 0; i < input.length; i++) {
+ var char = input.charCodeAt(i);
+ if (char < 128) {
+ bytes[byteIndex++] = char;
+ continue;
+ }
+ else if (char < 2048) {
+ bytes[byteIndex++] = char >> 6 | 192;
+ }
+ else {
+ if (char > 0xd7ff && char < 0xdc00) {
+ if (++i >= input.length) {
+ throw new Error("Incomplete surrogate pair.");
+ }
+ var c2 = input.charCodeAt(i);
+ if (c2 < 0xdc00 || c2 > 0xdfff) {
+ throw new Error("Invalid surrogate character.");
+ }
+ char = 0x10000 + ((char & 0x03ff) << 10) + (c2 & 0x03ff);
+ bytes[byteIndex++] = char >> 18 | 240;
+ bytes[byteIndex++] = char >> 12 & 63 | 128;
+ }
+ else {
+ bytes[byteIndex++] = char >> 12 | 224;
+ }
+ bytes[byteIndex++] = char >> 6 & 63 | 128;
+ }
+ bytes[byteIndex++] = char & 63 | 128;
+ }
+ return bytes.subarray(0, byteIndex);
+}
+exports.utf8Encode = utf8Encode;
+/**
+ * UTF-8 decodes the given byte sequence into a string.
+ *
+ * @param bytes - a byte sequence
+ */
+function utf8Decode(bytes) {
+ var result = "";
+ var i = 0;
+ while (i < bytes.length) {
+ var c = bytes[i++];
+ if (c > 127) {
+ if (c > 191 && c < 224) {
+ if (i >= bytes.length) {
+ throw new Error("Incomplete 2-byte sequence.");
+ }
+ c = (c & 31) << 6 | bytes[i++] & 63;
+ }
+ else if (c > 223 && c < 240) {
+ if (i + 1 >= bytes.length) {
+ throw new Error("Incomplete 3-byte sequence.");
+ }
+ c = (c & 15) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63;
+ }
+ else if (c > 239 && c < 248) {
+ if (i + 2 >= bytes.length) {
+ throw new Error("Incomplete 4-byte sequence.");
+ }
+ c = (c & 7) << 18 | (bytes[i++] & 63) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63;
+ }
+ else {
+ throw new Error("Unknown multi-byte start.");
+ }
+ }
+ if (c <= 0xffff) {
+ result += String.fromCharCode(c);
+ }
+ else if (c <= 0x10ffff) {
+ c -= 0x10000;
+ result += String.fromCharCode(c >> 10 | 0xd800);
+ result += String.fromCharCode(c & 0x3FF | 0xdc00);
+ }
+ else {
+ throw new Error("Code point exceeds UTF-16 limit.");
+ }
+ }
+ return result;
+}
+exports.utf8Decode = utf8Decode;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@oozcitak/util/lib/index.js.map b/node_modules/@oozcitak/util/lib/index.js.map
new file mode 100644
index 0000000..df59810
--- /dev/null
+++ b/node_modules/@oozcitak/util/lib/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAA6C;AAApC,sCAAA,YAAY,CAAA;AACrB,6CAA2C;AAAlC,oCAAA,WAAW,CAAA;AACpB,+CAA6C;AAApC,sCAAA,YAAY,CAAA;AACrB,+BAA6B;AAApB,sBAAA,IAAI,CAAA;AACb,+CAA6C;AAApC,sCAAA,YAAY,CAAA;AAErB;;;;;;;;GAQG;AACH,SAAgB,UAAU,CAAC,SAAc,EAAE,UAAe;IAAE,mBAAsB;SAAtB,UAAsB,EAAtB,qBAAsB,EAAtB,IAAsB;QAAtB,kCAAsB;;IAChF,MAAM,CAAC,mBAAmB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAA,IAAI;QAC3D,IAAI,IAAI,KAAK,aAAa,EAAE;YAC1B,IAAI,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;gBAClC,IAAM,WAAW,GAAG,MAAM,CAAC,wBAAwB,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;gBAC9E,0BAA0B;gBAC1B,IAAI,WAAW,EAAE;oBACf,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,SA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,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAA;aACtF;iBAAM;gBACF,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;aAC7C;SACJ;QACD,IAAI,CAAC,IAAI,MAAM,EAAE;YACb,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;SACjC;aACE,IAAI,CAAC,IAAI,QAAQ,EAAE;YACvB,CAAC,IAAI,OAAO,CAAA;YACZ,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,CAAA;YAC/C,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,GAAG,KAAK,GAAG,MAAM,CAAC,CAAA;SACjD;aAAM;YACH,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAA;SACpD;KACF;IAEF,OAAO,MAAM,CAAA;AACd,CAAC;AAtCD,gCAsCC"}
\ No newline at end of file
diff --git a/node_modules/@oozcitak/util/package.json b/node_modules/@oozcitak/util/package.json
new file mode 100644
index 0000000..10fa420
--- /dev/null
+++ b/node_modules/@oozcitak/util/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "@oozcitak/util",
+ "version": "8.3.8",
+ "keywords": [
+ "util",
+ "js"
+ ],
+ "homepage": "http://github.com/oozcitak/util",
+ "description": "Utility functions",
+ "author": "Ozgur Ozcitak ",
+ "contributors": [],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/oozcitak/util.git"
+ },
+ "bugs": {
+ "url": "http://github.com/oozcitak/util/issues"
+ },
+ "main": "./lib/index",
+ "engines": {
+ "node": ">=8.0"
+ },
+ "files": [
+ "lib/**/*"
+ ],
+ "dependencies": {},
+ "devDependencies": {
+ "typescript": "*",
+ "jest": "*",
+ "ts-jest": "*",
+ "coveralls": "*",
+ "@types/node": "*",
+ "@types/jest": "*"
+ },
+ "jest": {
+ "transform": {
+ "^.+\\.tsx?$": "ts-jest"
+ },
+ "testEnvironment": "node",
+ "collectCoverageFrom": [
+ "src/**/*.{ts,tsx}"
+ ]
+ },
+ "scripts": {
+ "compile": "rm -rf lib && tsc",
+ "test": "npm run compile && jest --coverage",
+ "publish-public": "npm run test && npm publish --access public"
+ }
+}
diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/node/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md
new file mode 100644
index 0000000..9469bad
--- /dev/null
+++ b/node_modules/@types/node/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/node`
+
+# Summary
+This package contains type definitions for node (https://nodejs.org/).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
+
+### Additional Details
+ * Last updated: Wed, 08 May 2024 12:09:52 GMT
+ * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
+
+# Credits
+These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).
diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts
new file mode 100644
index 0000000..08fada9
--- /dev/null
+++ b/node_modules/@types/node/assert.d.ts
@@ -0,0 +1,1040 @@
+/**
+ * The `node:assert` module provides a set of assertion functions for verifying
+ * invariants.
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/assert.js)
+ */
+declare module "assert" {
+ /**
+ * An alias of {@link ok}.
+ * @since v0.5.9
+ * @param value The input that is checked for being truthy.
+ */
+ function assert(value: unknown, message?: string | Error): asserts value;
+ namespace assert {
+ /**
+ * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class.
+ */
+ class AssertionError extends Error {
+ /**
+ * Set to the `actual` argument for methods such as {@link assert.strictEqual()}.
+ */
+ actual: unknown;
+ /**
+ * Set to the `expected` argument for methods such as {@link assert.strictEqual()}.
+ */
+ expected: unknown;
+ /**
+ * Set to the passed in operator value.
+ */
+ operator: string;
+ /**
+ * Indicates if the message was auto-generated (`true`) or not.
+ */
+ generatedMessage: boolean;
+ /**
+ * Value is always `ERR_ASSERTION` to show that the error is an assertion error.
+ */
+ code: "ERR_ASSERTION";
+ constructor(options?: {
+ /** If provided, the error message is set to this value. */
+ message?: string | undefined;
+ /** The `actual` property on the error instance. */
+ actual?: unknown | undefined;
+ /** The `expected` property on the error instance. */
+ expected?: unknown | undefined;
+ /** The `operator` property on the error instance. */
+ operator?: string | undefined;
+ /** If provided, the generated stack trace omits frames before this function. */
+ // eslint-disable-next-line @typescript-eslint/ban-types
+ stackStartFn?: Function | undefined;
+ });
+ }
+ /**
+ * This feature is deprecated and will be removed in a future version.
+ * Please consider using alternatives such as the `mock` helper function.
+ * @since v14.2.0, v12.19.0
+ * @deprecated Deprecated
+ */
+ class CallTracker {
+ /**
+ * The wrapper function is expected to be called exactly `exact` times. If the
+ * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
+ * error.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func);
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @param [fn='A no-op function']
+ * @param [exact=1]
+ * @return A function that wraps `fn`.
+ */
+ calls(exact?: number): () => void;
+ calls any>(fn?: Func, exact?: number): Func;
+ /**
+ * Example:
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ * const callsfunc = tracker.calls(func);
+ * callsfunc(1, 2, 3);
+ *
+ * assert.deepStrictEqual(tracker.getCalls(callsfunc),
+ * [{ thisArg: undefined, arguments: [1, 2, 3] }]);
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @return An array with all the calls to a tracked function.
+ */
+ getCalls(fn: Function): CallTrackerCall[];
+ /**
+ * The arrays contains information about the expected and actual number of calls of
+ * the functions that have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * // Returns an array containing information on callsfunc()
+ * console.log(tracker.report());
+ * // [
+ * // {
+ * // message: 'Expected the func function to be executed 2 time(s) but was
+ * // executed 0 time(s).',
+ * // actual: 0,
+ * // expected: 2,
+ * // operator: 'func',
+ * // stack: stack trace
+ * // }
+ * // ]
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @return An array of objects containing information about the wrapper functions returned by {@link tracker.calls()}.
+ */
+ report(): CallTrackerReportInformation[];
+ /**
+ * Reset calls of the call tracker. If a tracked function is passed as an argument, the calls will be reset for it.
+ * If no arguments are passed, all tracked functions will be reset.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ * const callsfunc = tracker.calls(func);
+ *
+ * callsfunc();
+ * // Tracker was called once
+ * assert.strictEqual(tracker.getCalls(callsfunc).length, 1);
+ *
+ * tracker.reset(callsfunc);
+ * assert.strictEqual(tracker.getCalls(callsfunc).length, 0);
+ * ```
+ * @since v18.8.0, v16.18.0
+ * @param fn a tracked function to reset.
+ */
+ reset(fn?: Function): void;
+ /**
+ * Iterates through the list of functions passed to {@link tracker.calls()} and will throw an error for functions that
+ * have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * callsfunc();
+ *
+ * // Will throw an error since callsfunc() was only called once.
+ * tracker.verify();
+ * ```
+ * @since v14.2.0, v12.19.0
+ */
+ verify(): void;
+ }
+ interface CallTrackerCall {
+ thisArg: object;
+ arguments: unknown[];
+ }
+ interface CallTrackerReportInformation {
+ message: string;
+ /** The actual number of times the function was called. */
+ actual: number;
+ /** The number of times the function was expected to be called. */
+ expected: number;
+ /** The name of the function that is wrapped. */
+ operator: string;
+ /** A stack trace of the function. */
+ stack: object;
+ }
+ type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error;
+ /**
+ * Throws an `AssertionError` with the provided error message or a default
+ * error message. If the `message` parameter is an instance of an `Error` then
+ * it will be thrown instead of the `AssertionError`.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.fail();
+ * // AssertionError [ERR_ASSERTION]: Failed
+ *
+ * assert.fail('boom');
+ * // AssertionError [ERR_ASSERTION]: boom
+ *
+ * assert.fail(new TypeError('need array'));
+ * // TypeError: need array
+ * ```
+ *
+ * Using `assert.fail()` with more than two arguments is possible but deprecated.
+ * See below for further details.
+ * @since v0.1.21
+ * @param [message='Failed']
+ */
+ function fail(message?: string | Error): never;
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
+ function fail(
+ actual: unknown,
+ expected: unknown,
+ message?: string | Error,
+ operator?: string,
+ // eslint-disable-next-line @typescript-eslint/ban-types
+ stackStartFn?: Function,
+ ): never;
+ /**
+ * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`.
+ *
+ * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default
+ * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
+ *
+ * Be aware that in the `repl` the error message will be different to the one
+ * thrown in a file! See below for further details.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.ok(true);
+ * // OK
+ * assert.ok(1);
+ * // OK
+ *
+ * assert.ok();
+ * // AssertionError: No value argument passed to `assert.ok()`
+ *
+ * assert.ok(false, 'it\'s false');
+ * // AssertionError: it's false
+ *
+ * // In the repl:
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: false == true
+ *
+ * // In a file (e.g. test.js):
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(typeof 123 === 'string')
+ *
+ * assert.ok(false);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(false)
+ *
+ * assert.ok(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(0)
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * // Using `assert()` works the same:
+ * assert(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert(0)
+ * ```
+ * @since v0.1.21
+ */
+ function ok(value: unknown, message?: string | Error): asserts value;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link strictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
+ *
+ * Tests shallow, coercive equality between the `actual` and `expected` parameters
+ * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
+ * and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * assert.equal(1, 1);
+ * // OK, 1 == 1
+ * assert.equal(1, '1');
+ * // OK, 1 == '1'
+ * assert.equal(NaN, NaN);
+ * // OK
+ *
+ * assert.equal(1, 2);
+ * // AssertionError: 1 == 2
+ * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
+ * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
+ * ```
+ *
+ * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default
+ * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function equal(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
+ *
+ * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
+ * specially handled and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * assert.notEqual(1, 2);
+ * // OK
+ *
+ * assert.notEqual(1, 1);
+ * // AssertionError: 1 != 1
+ *
+ * assert.notEqual(1, '1');
+ * // AssertionError: 1 != '1'
+ * ```
+ *
+ * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error
+ * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link deepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
+ *
+ * Tests for deep equality between the `actual` and `expected` parameters. Consider
+ * using {@link deepStrictEqual} instead. {@link deepEqual} can have
+ * surprising results.
+ *
+ * _Deep equality_ means that the enumerable "own" properties of child objects
+ * are also recursively evaluated by the following rules.
+ * @since v0.1.21
+ */
+ function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notDeepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
+ *
+ * Tests for any deep inequality. Opposite of {@link deepEqual}.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const obj1 = {
+ * a: {
+ * b: 1,
+ * },
+ * };
+ * const obj2 = {
+ * a: {
+ * b: 2,
+ * },
+ * };
+ * const obj3 = {
+ * a: {
+ * b: 1,
+ * },
+ * };
+ * const obj4 = { __proto__: obj1 };
+ *
+ * assert.notDeepEqual(obj1, obj1);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj2);
+ * // OK
+ *
+ * assert.notDeepEqual(obj1, obj3);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj4);
+ * // OK
+ * ```
+ *
+ * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default
+ * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests strict equality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.strictEqual(1, 2);
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * //
+ * // 1 !== 2
+ *
+ * assert.strictEqual(1, 1);
+ * // OK
+ *
+ * assert.strictEqual('Hello foobar', 'Hello World!');
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * // + actual - expected
+ * //
+ * // + 'Hello foobar'
+ * // - 'Hello World!'
+ * // ^
+ *
+ * const apples = 1;
+ * const oranges = 2;
+ * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
+ * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
+ *
+ * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
+ * // TypeError: Inputs are not identical
+ * ```
+ *
+ * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a
+ * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests strict inequality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.notStrictEqual(1, 2);
+ * // OK
+ *
+ * assert.notStrictEqual(1, 1);
+ * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
+ * //
+ * // 1
+ *
+ * assert.notStrictEqual(1, '1');
+ * // OK
+ * ```
+ *
+ * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a
+ * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests for deep equality between the `actual` and `expected` parameters.
+ * "Deep" equality means that the enumerable "own" properties of child objects
+ * are recursively evaluated also by the following rules.
+ * @since v1.2.0
+ */
+ function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
+ * // OK
+ * ```
+ *
+ * If the values are deeply and strictly equal, an `AssertionError` is thrown
+ * with a `message` property set equal to the value of the `message` parameter. If
+ * the `message` parameter is undefined, a default error message is assigned. If
+ * the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v1.2.0
+ */
+ function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Expects the function `fn` to throw an error.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * a validation object where each property will be tested for strict deep equality,
+ * or an instance of error where each property will be tested for strict deep
+ * equality including the non-enumerable `message` and `name` properties. When
+ * using an object, it is also possible to use a regular expression, when
+ * validating against a string property. See below for examples.
+ *
+ * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation
+ * fails.
+ *
+ * Custom validation object/error instance:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * const err = new TypeError('Wrong value');
+ * err.code = 404;
+ * err.foo = 'bar';
+ * err.info = {
+ * nested: true,
+ * baz: 'text',
+ * };
+ * err.reg = /abc/i;
+ *
+ * assert.throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value',
+ * info: {
+ * nested: true,
+ * baz: 'text',
+ * },
+ * // Only properties on the validation object will be tested for.
+ * // Using nested objects requires all properties to be present. Otherwise
+ * // the validation is going to fail.
+ * },
+ * );
+ *
+ * // Using regular expressions to validate error properties:
+ * assert.throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * // The `name` and `message` properties are strings and using regular
+ * // expressions on those will match against the string. If they fail, an
+ * // error is thrown.
+ * name: /^TypeError$/,
+ * message: /Wrong/,
+ * foo: 'bar',
+ * info: {
+ * nested: true,
+ * // It is not possible to use regular expressions for nested properties!
+ * baz: 'text',
+ * },
+ * // The `reg` property contains a regular expression and only if the
+ * // validation object contains an identical regular expression, it is going
+ * // to pass.
+ * reg: /abc/i,
+ * },
+ * );
+ *
+ * // Fails due to the different `message` and `name` properties:
+ * assert.throws(
+ * () => {
+ * const otherErr = new Error('Not found');
+ * // Copy all enumerable properties from `err` to `otherErr`.
+ * for (const [key, value] of Object.entries(err)) {
+ * otherErr[key] = value;
+ * }
+ * throw otherErr;
+ * },
+ * // The error's `message` and `name` properties will also be checked when using
+ * // an error as validation object.
+ * err,
+ * );
+ * ```
+ *
+ * Validate instanceof using constructor:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * Error,
+ * );
+ * ```
+ *
+ * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
+ *
+ * Using a regular expression runs `.toString` on the error object, and will
+ * therefore also include the error name.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * /^Error: Wrong value$/,
+ * );
+ * ```
+ *
+ * Custom error validation:
+ *
+ * The function must return `true` to indicate all internal validations passed.
+ * It will otherwise fail with an `AssertionError`.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * (err) => {
+ * assert(err instanceof Error);
+ * assert(/value/.test(err));
+ * // Avoid returning anything from validation functions besides `true`.
+ * // Otherwise, it's not clear what part of the validation failed. Instead,
+ * // throw an error about the specific validation that failed (as done in this
+ * // example) and add as much helpful debugging information to that error as
+ * // possible.
+ * return true;
+ * },
+ * 'unexpected error',
+ * );
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same
+ * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
+ * a string as the second argument gets considered:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * function throwingFirst() {
+ * throw new Error('First');
+ * }
+ *
+ * function throwingSecond() {
+ * throw new Error('Second');
+ * }
+ *
+ * function notThrowing() {}
+ *
+ * // The second argument is a string and the input function threw an Error.
+ * // The first case will not throw as it does not match for the error message
+ * // thrown by the input function!
+ * assert.throws(throwingFirst, 'Second');
+ * // In the next example the message has no benefit over the message from the
+ * // error and since it is not clear if the user intended to actually match
+ * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
+ * assert.throws(throwingSecond, 'Second');
+ * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
+ *
+ * // The string is only used (as message) in case the function does not throw:
+ * assert.throws(notThrowing, 'Second');
+ * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
+ *
+ * // If it was intended to match for the error message do this instead:
+ * // It does not throw because the error messages match.
+ * assert.throws(throwingSecond, /Second$/);
+ *
+ * // If the error message does not match, an AssertionError is thrown.
+ * assert.throws(throwingFirst, /Second$/);
+ * // AssertionError [ERR_ASSERTION]
+ * ```
+ *
+ * Due to the confusing error-prone notation, avoid a string as the second
+ * argument.
+ * @since v0.1.21
+ */
+ function throws(block: () => unknown, message?: string | Error): void;
+ function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Asserts that the function `fn` does not throw an error.
+ *
+ * Using `assert.doesNotThrow()` is actually not useful because there
+ * is no benefit in catching an error and then rethrowing it. Instead, consider
+ * adding a comment next to the specific code path that should not throw and keep
+ * error messages as expressive as possible.
+ *
+ * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function.
+ *
+ * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a
+ * different type, or if the `error` parameter is undefined, the error is
+ * propagated back to the caller.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
+ * function. See {@link throws} for more details.
+ *
+ * The following, for instance, will throw the `TypeError` because there is no
+ * matching error type in the assertion:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError,
+ * );
+ * ```
+ *
+ * However, the following will result in an `AssertionError` with the message
+ * 'Got unwanted exception...':
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * TypeError,
+ * );
+ * ```
+ *
+ * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message:
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * /Wrong value/,
+ * 'Whoops',
+ * );
+ * // Throws: AssertionError: Got unwanted exception: Whoops
+ * ```
+ * @since v0.1.21
+ */
+ function doesNotThrow(block: () => unknown, message?: string | Error): void;
+ function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Throws `value` if `value` is not `undefined` or `null`. This is useful when
+ * testing the `error` argument in callbacks. The stack trace contains all frames
+ * from the error passed to `ifError()` including the potential new frames for `ifError()` itself.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.ifError(null);
+ * // OK
+ * assert.ifError(0);
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
+ * assert.ifError('error');
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
+ * assert.ifError(new Error());
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
+ *
+ * // Create some random error frames.
+ * let err;
+ * (function errorFrame() {
+ * err = new Error('test error');
+ * })();
+ *
+ * (function ifErrorFrame() {
+ * assert.ifError(err);
+ * })();
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
+ * // at ifErrorFrame
+ * // at errorFrame
+ * ```
+ * @since v0.1.97
+ */
+ function ifError(value: unknown): asserts value is null | undefined;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the
+ * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v20.x/api/errors.html#err_invalid_return_value)
+ * error. In both cases the error handler is skipped.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link throws}.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * an object where each property will be tested for, or an instance of error where
+ * each property will be tested for including the non-enumerable `message` and `name` properties.
+ *
+ * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value',
+ * },
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * (err) => {
+ * assert.strictEqual(err.name, 'TypeError');
+ * assert.strictEqual(err.message, 'Wrong value');
+ * return true;
+ * },
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.rejects(
+ * Promise.reject(new Error('Wrong value')),
+ * Error,
+ * ).then(() => {
+ * // ...
+ * });
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to
+ * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the
+ * example in {@link throws} carefully if using a string as the second argument gets considered.
+ * @since v10.0.0
+ */
+ function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise;
+ function rejects(
+ block: (() => Promise) | Promise,
+ error: AssertPredicate,
+ message?: string | Error,
+ ): Promise;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is not rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If
+ * the function does not return a promise, `assert.doesNotReject()` will return a
+ * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v20.x/api/errors.html#err_invalid_return_value) error. In both cases
+ * the error handler is skipped.
+ *
+ * Using `assert.doesNotReject()` is actually not useful because there is little
+ * benefit in catching a rejection and then rejecting it again. Instead, consider
+ * adding a comment next to the specific code path that should not reject and keep
+ * error messages as expressive as possible.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
+ * function. See {@link throws} for more details.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * await assert.doesNotReject(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError,
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
+ * .then(() => {
+ * // ...
+ * });
+ * ```
+ * @since v10.0.0
+ */
+ function doesNotReject(
+ block: (() => Promise) | Promise,
+ message?: string | Error,
+ ): Promise;
+ function doesNotReject(
+ block: (() => Promise) | Promise,
+ error: AssertPredicate,
+ message?: string | Error,
+ ): Promise;
+ /**
+ * Expects the `string` input to match the regular expression.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.match('I will fail', /pass/);
+ * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
+ *
+ * assert.match(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.match('I will pass', /pass/);
+ * // OK
+ * ```
+ *
+ * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an [Error](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
+ * @since v13.6.0, v12.16.0
+ */
+ function match(value: string, regExp: RegExp, message?: string | Error): void;
+ /**
+ * Expects the `string` input not to match the regular expression.
+ *
+ * ```js
+ * import assert from 'node:assert/strict';
+ *
+ * assert.doesNotMatch('I will fail', /fail/);
+ * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
+ *
+ * assert.doesNotMatch(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.doesNotMatch('I will pass', /different/);
+ * // OK
+ * ```
+ *
+ * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an [Error](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
+ * @since v13.6.0, v12.16.0
+ */
+ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
+ /**
+ * In strict assertion mode, non-strict methods behave like their corresponding strict methods. For example,
+ * {@link deepEqual} will behave like {@link deepStrictEqual}.
+ *
+ * In strict assertion mode, error messages for objects display a diff. In legacy assertion mode, error
+ * messages for objects display the objects, often truncated.
+ *
+ * To use strict assertion mode:
+ *
+ * ```js
+ * import { strict as assert } from 'node:assert';COPY
+ * import assert from 'node:assert/strict';
+ * ```
+ *
+ * Example error diff:
+ *
+ * ```js
+ * import { strict as assert } from 'node:assert';
+ *
+ * assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]);
+ * // AssertionError: Expected inputs to be strictly deep-equal:
+ * // + actual - expected ... Lines skipped
+ * //
+ * // [
+ * // [
+ * // ...
+ * // 2,
+ * // + 3
+ * // - '3'
+ * // ],
+ * // ...
+ * // 5
+ * // ]
+ * ```
+ *
+ * To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS` environment variables. This will also
+ * deactivate the colors in the REPL. For more on color support in terminal environments, read the tty
+ * `getColorDepth()` documentation.
+ *
+ * @since v15.0.0, v13.9.0, v12.16.2, v9.9.0
+ */
+ namespace strict {
+ type AssertionError = assert.AssertionError;
+ type AssertPredicate = assert.AssertPredicate;
+ type CallTrackerCall = assert.CallTrackerCall;
+ type CallTrackerReportInformation = assert.CallTrackerReportInformation;
+ }
+ const strict:
+ & Omit<
+ typeof assert,
+ | "equal"
+ | "notEqual"
+ | "deepEqual"
+ | "notDeepEqual"
+ | "ok"
+ | "strictEqual"
+ | "deepStrictEqual"
+ | "ifError"
+ | "strict"
+ >
+ & {
+ (value: unknown, message?: string | Error): asserts value;
+ equal: typeof strictEqual;
+ notEqual: typeof notStrictEqual;
+ deepEqual: typeof deepStrictEqual;
+ notDeepEqual: typeof notDeepStrictEqual;
+ // Mapped types and assertion functions are incompatible?
+ // TS2775: Assertions require every name in the call target
+ // to be declared with an explicit type annotation.
+ ok: typeof ok;
+ strictEqual: typeof strictEqual;
+ deepStrictEqual: typeof deepStrictEqual;
+ ifError: typeof ifError;
+ strict: typeof strict;
+ };
+ }
+ export = assert;
+}
+declare module "node:assert" {
+ import assert = require("assert");
+ export = assert;
+}
diff --git a/node_modules/@types/node/assert/strict.d.ts b/node_modules/@types/node/assert/strict.d.ts
new file mode 100644
index 0000000..f333913
--- /dev/null
+++ b/node_modules/@types/node/assert/strict.d.ts
@@ -0,0 +1,8 @@
+declare module "assert/strict" {
+ import { strict } from "node:assert";
+ export = strict;
+}
+declare module "node:assert/strict" {
+ import { strict } from "node:assert";
+ export = strict;
+}
diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts
new file mode 100644
index 0000000..9930a7e
--- /dev/null
+++ b/node_modules/@types/node/async_hooks.d.ts
@@ -0,0 +1,541 @@
+/**
+ * We strongly discourage the use of the `async_hooks` API.
+ * Other APIs that can cover most of its use cases include:
+ *
+ * * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v20.x/api/async_context.html#class-asynclocalstorage) tracks async context
+ * * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v20.x/api/process.html#processgetactiveresourcesinfo) tracks active resources
+ *
+ * The `node:async_hooks` module provides an API to track asynchronous resources.
+ * It can be accessed using:
+ *
+ * ```js
+ * import async_hooks from 'node:async_hooks';
+ * ```
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/async_hooks.js)
+ */
+declare module "async_hooks" {
+ /**
+ * ```js
+ * import { executionAsyncId } from 'node:async_hooks';
+ * import fs from 'node:fs';
+ *
+ * console.log(executionAsyncId()); // 1 - bootstrap
+ * const path = '.';
+ * fs.open(path, 'r', (err, fd) => {
+ * console.log(executionAsyncId()); // 6 - open()
+ * });
+ * ```
+ *
+ * The ID returned from `executionAsyncId()` is related to execution timing, not
+ * causality (which is covered by `triggerAsyncId()`):
+ *
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // Returns the ID of the server, not of the new connection, because the
+ * // callback runs in the execution scope of the server's MakeCallback().
+ * async_hooks.executionAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Returns the ID of a TickObject (process.nextTick()) because all
+ * // callbacks passed to .listen() are wrapped in a nextTick().
+ * async_hooks.executionAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get precise `executionAsyncIds` by default.
+ * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html#promise-execution-tracking).
+ * @since v8.1.0
+ * @return The `asyncId` of the current execution context. Useful to track when something calls.
+ */
+ function executionAsyncId(): number;
+ /**
+ * Resource objects returned by `executionAsyncResource()` are most often internal
+ * Node.js handle objects with undocumented APIs. Using any functions or properties
+ * on the object is likely to crash your application and should be avoided.
+ *
+ * Using `executionAsyncResource()` in the top-level execution context will
+ * return an empty object as there is no handle or request object to use,
+ * but having an object representing the top-level can be helpful.
+ *
+ * ```js
+ * import { open } from 'node:fs';
+ * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks';
+ *
+ * console.log(executionAsyncId(), executionAsyncResource()); // 1 {}
+ * open(new URL(import.meta.url), 'r', (err, fd) => {
+ * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap
+ * });
+ * ```
+ *
+ * This can be used to implement continuation local storage without the
+ * use of a tracking `Map` to store the metadata:
+ *
+ * ```js
+ * import { createServer } from 'node:http';
+ * import {
+ * executionAsyncId,
+ * executionAsyncResource,
+ * createHook,
+ * } from 'async_hooks';
+ * const sym = Symbol('state'); // Private symbol to avoid pollution
+ *
+ * createHook({
+ * init(asyncId, type, triggerAsyncId, resource) {
+ * const cr = executionAsyncResource();
+ * if (cr) {
+ * resource[sym] = cr[sym];
+ * }
+ * },
+ * }).enable();
+ *
+ * const server = createServer((req, res) => {
+ * executionAsyncResource()[sym] = { state: req.url };
+ * setTimeout(function() {
+ * res.end(JSON.stringify(executionAsyncResource()[sym]));
+ * }, 100);
+ * }).listen(3000);
+ * ```
+ * @since v13.9.0, v12.17.0
+ * @return The resource representing the current execution. Useful to store data within the resource.
+ */
+ function executionAsyncResource(): object;
+ /**
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // The resource that caused (or triggered) this callback to be called
+ * // was that of the new connection. Thus the return value of triggerAsyncId()
+ * // is the asyncId of "conn".
+ * async_hooks.triggerAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Even though all callbacks passed to .listen() are wrapped in a nextTick()
+ * // the callback itself exists because the call to the server's .listen()
+ * // was made. So the return value would be the ID of the server.
+ * async_hooks.triggerAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get valid `triggerAsyncId`s by default. See
+ * the section on [promise execution tracking](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html#promise-execution-tracking).
+ * @return The ID of the resource responsible for calling the callback that is currently being executed.
+ */
+ function triggerAsyncId(): number;
+ interface HookCallbacks {
+ /**
+ * Called when a class is constructed that has the possibility to emit an asynchronous event.
+ * @param asyncId A unique ID for the async resource
+ * @param type The type of the async resource
+ * @param triggerAsyncId The unique ID of the async resource in whose execution context this async resource was created
+ * @param resource Reference to the resource representing the async operation, needs to be released during destroy
+ */
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
+ /**
+ * When an asynchronous operation is initiated or completes a callback is called to notify the user.
+ * The before callback is called just before said callback is executed.
+ * @param asyncId the unique identifier assigned to the resource about to execute the callback.
+ */
+ before?(asyncId: number): void;
+ /**
+ * Called immediately after the callback specified in `before` is completed.
+ *
+ * If an uncaught exception occurs during execution of the callback, then `after` will run after the `'uncaughtException'` event is emitted or a `domain`'s handler runs.
+ * @param asyncId the unique identifier assigned to the resource which has executed the callback.
+ */
+ after?(asyncId: number): void;
+ /**
+ * Called when a promise has resolve() called. This may not be in the same execution id
+ * as the promise itself.
+ * @param asyncId the unique id for the promise that was resolve()d.
+ */
+ promiseResolve?(asyncId: number): void;
+ /**
+ * Called after the resource corresponding to asyncId is destroyed
+ * @param asyncId a unique ID for the async resource
+ */
+ destroy?(asyncId: number): void;
+ }
+ interface AsyncHook {
+ /**
+ * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
+ */
+ enable(): this;
+ /**
+ * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
+ */
+ disable(): this;
+ }
+ /**
+ * Registers functions to be called for different lifetime events of each async
+ * operation.
+ *
+ * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
+ * respective asynchronous event during a resource's lifetime.
+ *
+ * All callbacks are optional. For example, if only resource cleanup needs to
+ * be tracked, then only the `destroy` callback needs to be passed. The
+ * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
+ *
+ * ```js
+ * import { createHook } from 'node:async_hooks';
+ *
+ * const asyncHook = createHook({
+ * init(asyncId, type, triggerAsyncId, resource) { },
+ * destroy(asyncId) { },
+ * });
+ * ```
+ *
+ * The callbacks will be inherited via the prototype chain:
+ *
+ * ```js
+ * class MyAsyncCallbacks {
+ * init(asyncId, type, triggerAsyncId, resource) { }
+ * destroy(asyncId) {}
+ * }
+ *
+ * class MyAddedCallbacks extends MyAsyncCallbacks {
+ * before(asyncId) { }
+ * after(asyncId) { }
+ * }
+ *
+ * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
+ * ```
+ *
+ * Because promises are asynchronous resources whose lifecycle is tracked
+ * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
+ * @since v8.1.0
+ * @param callbacks The `Hook Callbacks` to register
+ * @return Instance used for disabling and enabling hooks
+ */
+ function createHook(callbacks: HookCallbacks): AsyncHook;
+ interface AsyncResourceOptions {
+ /**
+ * The ID of the execution context that created this async event.
+ * @default executionAsyncId()
+ */
+ triggerAsyncId?: number | undefined;
+ /**
+ * Disables automatic `emitDestroy` when the object is garbage collected.
+ * This usually does not need to be set (even if `emitDestroy` is called
+ * manually), unless the resource's `asyncId` is retrieved and the
+ * sensitive API's `emitDestroy` is called with it.
+ * @default false
+ */
+ requireManualDestroy?: boolean | undefined;
+ }
+ /**
+ * The class `AsyncResource` is designed to be extended by the embedder's async
+ * resources. Using this, users can easily trigger the lifetime events of their
+ * own resources.
+ *
+ * The `init` hook will trigger when an `AsyncResource` is instantiated.
+ *
+ * The following is an overview of the `AsyncResource` API.
+ *
+ * ```js
+ * import { AsyncResource, executionAsyncId } from 'node:async_hooks';
+ *
+ * // AsyncResource() is meant to be extended. Instantiating a
+ * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * // async_hook.executionAsyncId() is used.
+ * const asyncResource = new AsyncResource(
+ * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false },
+ * );
+ *
+ * // Run a function in the execution context of the resource. This will
+ * // * establish the context of the resource
+ * // * trigger the AsyncHooks before callbacks
+ * // * call the provided function `fn` with the supplied arguments
+ * // * trigger the AsyncHooks after callbacks
+ * // * restore the original execution context
+ * asyncResource.runInAsyncScope(fn, thisArg, ...args);
+ *
+ * // Call AsyncHooks destroy callbacks.
+ * asyncResource.emitDestroy();
+ *
+ * // Return the unique ID assigned to the AsyncResource instance.
+ * asyncResource.asyncId();
+ *
+ * // Return the trigger ID for the AsyncResource instance.
+ * asyncResource.triggerAsyncId();
+ * ```
+ */
+ class AsyncResource {
+ /**
+ * AsyncResource() is meant to be extended. Instantiating a
+ * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * async_hook.executionAsyncId() is used.
+ * @param type The type of async event.
+ * @param triggerAsyncId The ID of the execution context that created
+ * this async event (default: `executionAsyncId()`), or an
+ * AsyncResourceOptions object (since v9.3.0)
+ */
+ constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
+ /**
+ * Binds the given function to the current execution context.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current execution context.
+ * @param type An optional name to associate with the underlying `AsyncResource`.
+ */
+ static bind any, ThisArg>(
+ fn: Func,
+ type?: string,
+ thisArg?: ThisArg,
+ ): Func;
+ /**
+ * Binds the given function to execute to this `AsyncResource`'s scope.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current `AsyncResource`.
+ */
+ bind any>(fn: Func): Func;
+ /**
+ * Call the provided function with the provided arguments in the execution context
+ * of the async resource. This will establish the context, trigger the AsyncHooks
+ * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
+ * then restore the original execution context.
+ * @since v9.6.0
+ * @param fn The function to call in the execution context of this async resource.
+ * @param thisArg The receiver to be used for the function call.
+ * @param args Optional arguments to pass to the function.
+ */
+ runInAsyncScope(
+ fn: (this: This, ...args: any[]) => Result,
+ thisArg?: This,
+ ...args: any[]
+ ): Result;
+ /**
+ * Call all `destroy` hooks. This should only ever be called once. An error will
+ * be thrown if it is called more than once. This **must** be manually called. If
+ * the resource is left to be collected by the GC then the `destroy` hooks will
+ * never be called.
+ * @return A reference to `asyncResource`.
+ */
+ emitDestroy(): this;
+ /**
+ * @return The unique `asyncId` assigned to the resource.
+ */
+ asyncId(): number;
+ /**
+ * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
+ */
+ triggerAsyncId(): number;
+ }
+ /**
+ * This class creates stores that stay coherent through asynchronous operations.
+ *
+ * While you can create your own implementation on top of the `node:async_hooks` module, `AsyncLocalStorage` should be preferred as it is a performant and memory
+ * safe implementation that involves significant optimizations that are non-obvious
+ * to implement.
+ *
+ * The following example uses `AsyncLocalStorage` to build a simple logger
+ * that assigns IDs to incoming HTTP requests and includes them in messages
+ * logged within each request.
+ *
+ * ```js
+ * import http from 'node:http';
+ * import { AsyncLocalStorage } from 'node:async_hooks';
+ *
+ * const asyncLocalStorage = new AsyncLocalStorage();
+ *
+ * function logWithId(msg) {
+ * const id = asyncLocalStorage.getStore();
+ * console.log(`${id !== undefined ? id : '-'}:`, msg);
+ * }
+ *
+ * let idSeq = 0;
+ * http.createServer((req, res) => {
+ * asyncLocalStorage.run(idSeq++, () => {
+ * logWithId('start');
+ * // Imagine any chain of async operations here
+ * setImmediate(() => {
+ * logWithId('finish');
+ * res.end();
+ * });
+ * });
+ * }).listen(8080);
+ *
+ * http.get('http://localhost:8080');
+ * http.get('http://localhost:8080');
+ * // Prints:
+ * // 0: start
+ * // 1: start
+ * // 0: finish
+ * // 1: finish
+ * ```
+ *
+ * Each instance of `AsyncLocalStorage` maintains an independent storage context.
+ * Multiple instances can safely exist simultaneously without risk of interfering
+ * with each other's data.
+ * @since v13.10.0, v12.17.0
+ */
+ class AsyncLocalStorage {
+ /**
+ * Binds the given function to the current execution context.
+ * @since v19.8.0
+ * @experimental
+ * @param fn The function to bind to the current execution context.
+ * @return A new function that calls `fn` within the captured execution context.
+ */
+ static bind any>(fn: Func): Func;
+ /**
+ * Captures the current execution context and returns a function that accepts a
+ * function as an argument. Whenever the returned function is called, it
+ * calls the function passed to it within the captured context.
+ *
+ * ```js
+ * const asyncLocalStorage = new AsyncLocalStorage();
+ * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot());
+ * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore()));
+ * console.log(result); // returns 123
+ * ```
+ *
+ * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple
+ * async context tracking purposes, for example:
+ *
+ * ```js
+ * class Foo {
+ * #runInAsyncScope = AsyncLocalStorage.snapshot();
+ *
+ * get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); }
+ * }
+ *
+ * const foo = asyncLocalStorage.run(123, () => new Foo());
+ * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123
+ * ```
+ * @since v19.8.0
+ * @experimental
+ * @return A new function with the signature `(fn: (...args) : R, ...args) : R`.
+ */
+ static snapshot(): (fn: (...args: TArgs) => R, ...args: TArgs) => R;
+ /**
+ * Disables the instance of `AsyncLocalStorage`. All subsequent calls
+ * to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
+ *
+ * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
+ * instance will be exited.
+ *
+ * Calling `asyncLocalStorage.disable()` is required before the `asyncLocalStorage` can be garbage collected. This does not apply to stores
+ * provided by the `asyncLocalStorage`, as those objects are garbage collected
+ * along with the corresponding async resources.
+ *
+ * Use this method when the `asyncLocalStorage` is not in use anymore
+ * in the current process.
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ disable(): void;
+ /**
+ * Returns the current store.
+ * If called outside of an asynchronous context initialized by
+ * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
+ * returns `undefined`.
+ * @since v13.10.0, v12.17.0
+ */
+ getStore(): T | undefined;
+ /**
+ * Runs a function synchronously within a context and returns its
+ * return value. The store is not accessible outside of the callback function.
+ * The store is accessible to any asynchronous operations created within the
+ * callback.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `run()` too.
+ * The stacktrace is not impacted by this call and the context is exited.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 2 };
+ * try {
+ * asyncLocalStorage.run(store, () => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * setTimeout(() => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * }, 200);
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ */
+ run(store: T, callback: () => R): R;
+ run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Runs a function synchronously outside of a context and returns its
+ * return value. The store is not accessible within the callback function or
+ * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `exit()` too.
+ * The stacktrace is not impacted by this call and the context is re-entered.
+ *
+ * Example:
+ *
+ * ```js
+ * // Within a call to run
+ * try {
+ * asyncLocalStorage.getStore(); // Returns the store object or value
+ * asyncLocalStorage.exit(() => {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns the same object or value
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ exit(callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Transitions into the context for the remainder of the current
+ * synchronous execution and then persists the store through any following
+ * asynchronous calls.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 1 };
+ * // Replaces previous store with the given store object
+ * asyncLocalStorage.enterWith(store);
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * someAsyncOperation(() => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ * ```
+ *
+ * This transition will continue for the _entire_ synchronous execution.
+ * This means that if, for example, the context is entered within an event
+ * handler subsequent event handlers will also run within that context unless
+ * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons
+ * to use the latter method.
+ *
+ * ```js
+ * const store = { id: 1 };
+ *
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.enterWith(store);
+ * });
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ *
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * emitter.emit('my-event');
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * ```
+ * @since v13.11.0, v12.17.0
+ * @experimental
+ */
+ enterWith(store: T): void;
+ }
+}
+declare module "node:async_hooks" {
+ export * from "async_hooks";
+}
diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts
new file mode 100644
index 0000000..53d62ad
--- /dev/null
+++ b/node_modules/@types/node/buffer.d.ts
@@ -0,0 +1,2363 @@
+/**
+ * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
+ * Node.js APIs support `Buffer`s.
+ *
+ * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and
+ * extends it with methods that cover additional use cases. Node.js APIs accept
+ * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well.
+ *
+ * While the `Buffer` class is available within the global scope, it is still
+ * recommended to explicitly reference it via an import or require statement.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Creates a zero-filled Buffer of length 10.
+ * const buf1 = Buffer.alloc(10);
+ *
+ * // Creates a Buffer of length 10,
+ * // filled with bytes which all have the value `1`.
+ * const buf2 = Buffer.alloc(10, 1);
+ *
+ * // Creates an uninitialized buffer of length 10.
+ * // This is faster than calling Buffer.alloc() but the returned
+ * // Buffer instance might contain old data that needs to be
+ * // overwritten using fill(), write(), or other functions that fill the Buffer's
+ * // contents.
+ * const buf3 = Buffer.allocUnsafe(10);
+ *
+ * // Creates a Buffer containing the bytes [1, 2, 3].
+ * const buf4 = Buffer.from([1, 2, 3]);
+ *
+ * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries
+ * // are all truncated using `(value & 255)` to fit into the range 0–255.
+ * const buf5 = Buffer.from([257, 257.5, -255, '1']);
+ *
+ * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést':
+ * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation)
+ * // [116, 195, 169, 115, 116] (in decimal notation)
+ * const buf6 = Buffer.from('tést');
+ *
+ * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
+ * const buf7 = Buffer.from('tést', 'latin1');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/buffer.js)
+ */
+declare module "buffer" {
+ import { BinaryLike } from "node:crypto";
+ import { ReadableStream as WebReadableStream } from "node:stream/web";
+ /**
+ * This function returns `true` if `input` contains only valid UTF-8-encoded data,
+ * including the case in which `input` is empty.
+ *
+ * Throws if the `input` is a detached array buffer.
+ * @since v19.4.0, v18.14.0
+ * @param input The input to validate.
+ */
+ export function isUtf8(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
+ /**
+ * This function returns `true` if `input` contains only valid ASCII-encoded data,
+ * including the case in which `input` is empty.
+ *
+ * Throws if the `input` is a detached array buffer.
+ * @since v19.6.0, v18.15.0
+ * @param input The input to validate.
+ */
+ export function isAscii(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
+ export const INSPECT_MAX_BYTES: number;
+ export const kMaxLength: number;
+ export const kStringMaxLength: number;
+ export const constants: {
+ MAX_LENGTH: number;
+ MAX_STRING_LENGTH: number;
+ };
+ export type TranscodeEncoding =
+ | "ascii"
+ | "utf8"
+ | "utf-8"
+ | "utf16le"
+ | "utf-16le"
+ | "ucs2"
+ | "ucs-2"
+ | "latin1"
+ | "binary";
+ /**
+ * Re-encodes the given `Buffer` or `Uint8Array` instance from one character
+ * encoding to another. Returns a new `Buffer` instance.
+ *
+ * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
+ * conversion from `fromEnc` to `toEnc` is not permitted.
+ *
+ * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
+ *
+ * The transcoding process will use substitution characters if a given byte
+ * sequence cannot be adequately represented in the target encoding. For instance:
+ *
+ * ```js
+ * import { Buffer, transcode } from 'node:buffer';
+ *
+ * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii');
+ * console.log(newBuf.toString('ascii'));
+ * // Prints: '?'
+ * ```
+ *
+ * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced
+ * with `?` in the transcoded `Buffer`.
+ * @since v7.1.0
+ * @param source A `Buffer` or `Uint8Array` instance.
+ * @param fromEnc The current encoding.
+ * @param toEnc To target encoding.
+ */
+ export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
+ export const SlowBuffer: {
+ /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
+ new(size: number): Buffer;
+ prototype: Buffer;
+ };
+ /**
+ * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
+ * a prior call to `URL.createObjectURL()`.
+ * @since v16.7.0
+ * @experimental
+ * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
+ */
+ export function resolveObjectURL(id: string): Blob | undefined;
+ export { Buffer };
+ /**
+ * @experimental
+ */
+ export interface BlobOptions {
+ /**
+ * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts
+ * will be converted to the platform native line-ending as specified by `require('node:os').EOL`.
+ */
+ endings?: "transparent" | "native";
+ /**
+ * The Blob content-type. The intent is for `type` to convey
+ * the MIME media type of the data, however no validation of the type format
+ * is performed.
+ */
+ type?: string | undefined;
+ }
+ /**
+ * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
+ * multiple worker threads.
+ * @since v15.7.0, v14.18.0
+ */
+ export class Blob {
+ /**
+ * The total size of the `Blob` in bytes.
+ * @since v15.7.0, v14.18.0
+ */
+ readonly size: number;
+ /**
+ * The content-type of the `Blob`.
+ * @since v15.7.0, v14.18.0
+ */
+ readonly type: string;
+ /**
+ * Creates a new `Blob` object containing a concatenation of the given sources.
+ *
+ * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
+ * the 'Blob' and can therefore be safely modified after the 'Blob' is created.
+ *
+ * String sources are also copied into the `Blob`.
+ */
+ constructor(sources: Array, options?: BlobOptions);
+ /**
+ * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
+ * the `Blob` data.
+ * @since v15.7.0, v14.18.0
+ */
+ arrayBuffer(): Promise;
+ /**
+ * Creates and returns a new `Blob` containing a subset of this `Blob` objects
+ * data. The original `Blob` is not altered.
+ * @since v15.7.0, v14.18.0
+ * @param start The starting index.
+ * @param end The ending index.
+ * @param type The content-type for the new `Blob`
+ */
+ slice(start?: number, end?: number, type?: string): Blob;
+ /**
+ * Returns a promise that fulfills with the contents of the `Blob` decoded as a
+ * UTF-8 string.
+ * @since v15.7.0, v14.18.0
+ */
+ text(): Promise;
+ /**
+ * Returns a new `ReadableStream` that allows the content of the `Blob` to be read.
+ * @since v16.7.0
+ */
+ stream(): WebReadableStream;
+ }
+ export interface FileOptions {
+ /**
+ * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be
+ * converted to the platform native line-ending as specified by `require('node:os').EOL`.
+ */
+ endings?: "native" | "transparent";
+ /** The File content-type. */
+ type?: string;
+ /** The last modified date of the file. `Default`: Date.now(). */
+ lastModified?: number;
+ }
+ /**
+ * A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
+ * @since v19.2.0, v18.13.0
+ */
+ export class File extends Blob {
+ constructor(sources: Array, fileName: string, options?: FileOptions);
+ /**
+ * The name of the `File`.
+ * @since v19.2.0, v18.13.0
+ */
+ readonly name: string;
+ /**
+ * The last modified date of the `File`.
+ * @since v19.2.0, v18.13.0
+ */
+ readonly lastModified: number;
+ }
+ export import atob = globalThis.atob;
+ export import btoa = globalThis.btoa;
+ import { Blob as NodeBlob } from "buffer";
+ // This conditional type will be the existing global Blob in a browser, or
+ // the copy below in a Node environment.
+ type __Blob = typeof globalThis extends { onmessage: any; Blob: any } ? {} : NodeBlob;
+ global {
+ namespace NodeJS {
+ export { BufferEncoding };
+ }
+ // Buffer class
+ type BufferEncoding =
+ | "ascii"
+ | "utf8"
+ | "utf-8"
+ | "utf16le"
+ | "utf-16le"
+ | "ucs2"
+ | "ucs-2"
+ | "base64"
+ | "base64url"
+ | "latin1"
+ | "binary"
+ | "hex";
+ type WithImplicitCoercion =
+ | T
+ | {
+ valueOf(): T;
+ };
+ /**
+ * Raw data is stored in instances of the Buffer class.
+ * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
+ * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
+ */
+ interface BufferConstructor {
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
+ */
+ new(str: string, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
+ */
+ new(size: number): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new(array: Uint8Array): Buffer;
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}/{SharedArrayBuffer}.
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
+ */
+ new(arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new(array: readonly any[]): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
+ */
+ new(buffer: Buffer): Buffer;
+ /**
+ * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
+ * Array entries outside that range will be truncated to fit into it.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
+ * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
+ * ```
+ *
+ * If `array` is an `Array`\-like object (that is, one with a `length` property of
+ * type `number`), it is treated as if it is an array, unless it is a `Buffer` or
+ * a `Uint8Array`. This means all other `TypedArray` variants get treated as an `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use `Buffer.copyBytesFrom()`.
+ *
+ * A `TypeError` will be thrown if `array` is not an `Array` or another type
+ * appropriate for `Buffer.from()` variants.
+ *
+ * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v5.10.0
+ */
+ from(
+ arrayBuffer: WithImplicitCoercion,
+ byteOffset?: number,
+ length?: number,
+ ): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param data data to create a new Buffer
+ */
+ from(data: Uint8Array | readonly number[]): Buffer;
+ from(data: WithImplicitCoercion): Buffer;
+ /**
+ * Creates a new Buffer containing the given JavaScript string {str}.
+ * If provided, the {encoding} parameter identifies the character encoding.
+ * If not provided, {encoding} defaults to 'utf8'.
+ */
+ from(
+ str:
+ | WithImplicitCoercion
+ | {
+ [Symbol.toPrimitive](hint: "string"): string;
+ },
+ encoding?: BufferEncoding,
+ ): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param values to create a new Buffer
+ */
+ of(...items: number[]): Buffer;
+ /**
+ * Returns `true` if `obj` is a `Buffer`, `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * Buffer.isBuffer(Buffer.alloc(10)); // true
+ * Buffer.isBuffer(Buffer.from('foo')); // true
+ * Buffer.isBuffer('a string'); // false
+ * Buffer.isBuffer([]); // false
+ * Buffer.isBuffer(new Uint8Array(1024)); // false
+ * ```
+ * @since v0.1.101
+ */
+ isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns `true` if `encoding` is the name of a supported character encoding,
+ * or `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * console.log(Buffer.isEncoding('utf8'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('hex'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('utf/8'));
+ * // Prints: false
+ *
+ * console.log(Buffer.isEncoding(''));
+ * // Prints: false
+ * ```
+ * @since v0.9.1
+ * @param encoding A character encoding name to check.
+ */
+ isEncoding(encoding: string): encoding is BufferEncoding;
+ /**
+ * Returns the byte length of a string when encoded using `encoding`.
+ * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account
+ * for the encoding that is used to convert the string into bytes.
+ *
+ * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input.
+ * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the
+ * return value might be greater than the length of a `Buffer` created from the
+ * string.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const str = '\u00bd + \u00bc = \u00be';
+ *
+ * console.log(`${str}: ${str.length} characters, ` +
+ * `${Buffer.byteLength(str, 'utf8')} bytes`);
+ * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes
+ * ```
+ *
+ * When `string` is a
+ * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/-
+ * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop-
+ * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned.
+ * @since v0.1.90
+ * @param string A value to calculate the length of.
+ * @param [encoding='utf8'] If `string` is a string, this is its encoding.
+ * @return The number of bytes contained within `string`.
+ */
+ byteLength(
+ string: string | Buffer | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
+ encoding?: BufferEncoding,
+ ): number;
+ /**
+ * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together.
+ *
+ * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned.
+ *
+ * If `totalLength` is not provided, it is calculated from the `Buffer` instances
+ * in `list` by adding their lengths.
+ *
+ * If `totalLength` is provided, it is coerced to an unsigned integer. If the
+ * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
+ * truncated to `totalLength`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * // Create a single `Buffer` from a list of three `Buffer` instances.
+ *
+ * const buf1 = Buffer.alloc(10);
+ * const buf2 = Buffer.alloc(14);
+ * const buf3 = Buffer.alloc(18);
+ * const totalLength = buf1.length + buf2.length + buf3.length;
+ *
+ * console.log(totalLength);
+ * // Prints: 42
+ *
+ * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
+ *
+ * console.log(bufA);
+ * // Prints:
+ * console.log(bufA.length);
+ * // Prints: 42
+ * ```
+ *
+ * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v0.7.11
+ * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
+ * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
+ */
+ concat(list: readonly Uint8Array[], totalLength?: number): Buffer;
+ /**
+ * Copies the underlying memory of `view` into a new `Buffer`.
+ *
+ * ```js
+ * const u16 = new Uint16Array([0, 0xffff]);
+ * const buf = Buffer.copyBytesFrom(u16, 1, 1);
+ * u16[1] = 0;
+ * console.log(buf.length); // 2
+ * console.log(buf[0]); // 255
+ * console.log(buf[1]); // 255
+ * ```
+ * @since v19.8.0
+ * @param view The {TypedArray} to copy.
+ * @param [offset=0] The starting offset within `view`.
+ * @param [length=view.length - offset] The number of elements from `view` to copy.
+ */
+ copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer;
+ /**
+ * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf1 = Buffer.from('1234');
+ * const buf2 = Buffer.from('0123');
+ * const arr = [buf1, buf2];
+ *
+ * console.log(arr.sort(Buffer.compare));
+ * // Prints: [ , ]
+ * // (This result is equal to: [buf2, buf1].)
+ * ```
+ * @since v0.11.13
+ * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
+ */
+ compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(5);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
+ *
+ * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(5, 'a');
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+ * initialized by calling `buf.fill(fill, encoding)`.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
+ * contents will never contain sensitive data from previous allocations, including
+ * data that might not have been allocated for `Buffer`s.
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ * @param [fill=0] A value to pre-fill the new `Buffer` with.
+ * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
+ */
+ alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
+ *
+ * ```js
+ * import { Buffer } from 'node:buffer';
+ *
+ * const buf = Buffer.allocUnsafe(10);
+ *
+ * console.log(buf);
+ * // Prints (contents may vary):