@intlayer/backend 7.0.8 → 7.0.9-canary.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (909) hide show
  1. package/README.md +6 -5
  2. package/dist/assets/utils/AI/askDocQuestion/embeddings/frequent_questions/en/package_version_error.json +3080 -0
  3. package/dist/cjs/controllers/dictionary.controller.cjs +64 -41
  4. package/dist/cjs/controllers/dictionary.controller.cjs.map +1 -1
  5. package/dist/cjs/emails/MagicLinkEmail.cjs +242 -0
  6. package/dist/cjs/emails/MagicLinkEmail.cjs.map +1 -0
  7. package/dist/cjs/index.cjs +1 -1
  8. package/dist/cjs/index.cjs.map +1 -1
  9. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/index.cjs +16 -0
  10. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/index.cjs.map +1 -0
  11. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/templates/encrypted-key.tpl.xml.cjs +25 -0
  12. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/templates/encrypted-key.tpl.xml.cjs.map +1 -0
  13. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/templates/keyinfo.tpl.xml.cjs +31 -0
  14. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/templates/keyinfo.tpl.xml.cjs.map +1 -0
  15. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/utils.cjs +38 -0
  16. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/utils.cjs.map +1 -0
  17. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/xmlenc.cjs +231 -0
  18. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/xmlenc.cjs.map +1 -0
  19. package/dist/cjs/node_modules/@better-auth/sso/dist/index.cjs +1210 -0
  20. package/dist/cjs/node_modules/@better-auth/sso/dist/index.cjs.map +1 -0
  21. package/dist/cjs/node_modules/@better-fetch/fetch/dist/index.cjs +362 -0
  22. package/dist/cjs/node_modules/@better-fetch/fetch/dist/index.cjs.map +1 -0
  23. package/dist/cjs/node_modules/@xmldom/is-dom-node/dist/index.cjs +89 -0
  24. package/dist/cjs/node_modules/@xmldom/is-dom-node/dist/index.cjs.map +1 -0
  25. package/dist/cjs/node_modules/@xmldom/xmldom/lib/conventions.cjs +110 -0
  26. package/dist/cjs/node_modules/@xmldom/xmldom/lib/conventions.cjs.map +1 -0
  27. package/dist/cjs/node_modules/@xmldom/xmldom/lib/dom-parser.cjs +248 -0
  28. package/dist/cjs/node_modules/@xmldom/xmldom/lib/dom-parser.cjs.map +1 -0
  29. package/dist/cjs/node_modules/@xmldom/xmldom/lib/dom.cjs +1309 -0
  30. package/dist/cjs/node_modules/@xmldom/xmldom/lib/dom.cjs.map +1 -0
  31. package/dist/cjs/node_modules/@xmldom/xmldom/lib/entities.cjs +2176 -0
  32. package/dist/cjs/node_modules/@xmldom/xmldom/lib/entities.cjs.map +1 -0
  33. package/dist/cjs/node_modules/@xmldom/xmldom/lib/index.cjs +20 -0
  34. package/dist/cjs/node_modules/@xmldom/xmldom/lib/index.cjs.map +1 -0
  35. package/dist/cjs/node_modules/@xmldom/xmldom/lib/sax.cjs +499 -0
  36. package/dist/cjs/node_modules/@xmldom/xmldom/lib/sax.cjs.map +1 -0
  37. package/dist/cjs/node_modules/asn1/lib/ber/errors.cjs +20 -0
  38. package/dist/cjs/node_modules/asn1/lib/ber/errors.cjs.map +1 -0
  39. package/dist/cjs/node_modules/asn1/lib/ber/index.cjs +28 -0
  40. package/dist/cjs/node_modules/asn1/lib/ber/index.cjs.map +1 -0
  41. package/dist/cjs/node_modules/asn1/lib/ber/reader.cjs +167 -0
  42. package/dist/cjs/node_modules/asn1/lib/ber/reader.cjs.map +1 -0
  43. package/dist/cjs/node_modules/asn1/lib/ber/types.cjs +47 -0
  44. package/dist/cjs/node_modules/asn1/lib/ber/types.cjs.map +1 -0
  45. package/dist/cjs/node_modules/asn1/lib/ber/writer.cjs +223 -0
  46. package/dist/cjs/node_modules/asn1/lib/ber/writer.cjs.map +1 -0
  47. package/dist/cjs/node_modules/asn1/lib/index.cjs +21 -0
  48. package/dist/cjs/node_modules/asn1/lib/index.cjs.map +1 -0
  49. package/dist/cjs/node_modules/camelcase/index.cjs +78 -0
  50. package/dist/cjs/node_modules/camelcase/index.cjs.map +1 -0
  51. package/dist/cjs/node_modules/escape-html/index.cjs +71 -0
  52. package/dist/cjs/node_modules/escape-html/index.cjs.map +1 -0
  53. package/dist/cjs/node_modules/fast-xml-parser/src/fxp.cjs +9 -0
  54. package/dist/cjs/node_modules/fast-xml-parser/src/fxp.cjs.map +1 -0
  55. package/dist/cjs/node_modules/fast-xml-parser/src/util.cjs +29 -0
  56. package/dist/cjs/node_modules/fast-xml-parser/src/util.cjs.map +1 -0
  57. package/dist/cjs/node_modules/fast-xml-parser/src/validator.cjs +244 -0
  58. package/dist/cjs/node_modules/fast-xml-parser/src/validator.cjs.map +1 -0
  59. package/dist/cjs/node_modules/jose/dist/webapi/lib/base64.cjs +14 -0
  60. package/dist/cjs/node_modules/jose/dist/webapi/lib/base64.cjs.map +1 -0
  61. package/dist/cjs/node_modules/jose/dist/webapi/lib/buffer_utils.cjs +10 -0
  62. package/dist/cjs/node_modules/jose/dist/webapi/lib/buffer_utils.cjs.map +1 -0
  63. package/dist/cjs/node_modules/jose/dist/webapi/lib/is_object.cjs +17 -0
  64. package/dist/cjs/node_modules/jose/dist/webapi/lib/is_object.cjs.map +1 -0
  65. package/dist/cjs/node_modules/jose/dist/webapi/util/base64url.cjs +20 -0
  66. package/dist/cjs/node_modules/jose/dist/webapi/util/base64url.cjs.map +1 -0
  67. package/dist/cjs/node_modules/jose/dist/webapi/util/decode_jwt.cjs +32 -0
  68. package/dist/cjs/node_modules/jose/dist/webapi/util/decode_jwt.cjs.map +1 -0
  69. package/dist/cjs/node_modules/jose/dist/webapi/util/errors.cjs +28 -0
  70. package/dist/cjs/node_modules/jose/dist/webapi/util/errors.cjs.map +1 -0
  71. package/dist/cjs/node_modules/node-forge/lib/aes.cjs +604 -0
  72. package/dist/cjs/node_modules/node-forge/lib/aes.cjs.map +1 -0
  73. package/dist/cjs/node_modules/node-forge/lib/aesCipherSuites.cjs +202 -0
  74. package/dist/cjs/node_modules/node-forge/lib/aesCipherSuites.cjs.map +1 -0
  75. package/dist/cjs/node_modules/node-forge/lib/asn1-validator.cjs +83 -0
  76. package/dist/cjs/node_modules/node-forge/lib/asn1-validator.cjs.map +1 -0
  77. package/dist/cjs/node_modules/node-forge/lib/asn1.cjs +945 -0
  78. package/dist/cjs/node_modules/node-forge/lib/asn1.cjs.map +1 -0
  79. package/dist/cjs/node_modules/node-forge/lib/baseN.cjs +144 -0
  80. package/dist/cjs/node_modules/node-forge/lib/baseN.cjs.map +1 -0
  81. package/dist/cjs/node_modules/node-forge/lib/cipher.cjs +193 -0
  82. package/dist/cjs/node_modules/node-forge/lib/cipher.cjs.map +1 -0
  83. package/dist/cjs/node_modules/node-forge/lib/cipherModes.cjs +604 -0
  84. package/dist/cjs/node_modules/node-forge/lib/cipherModes.cjs.map +1 -0
  85. package/dist/cjs/node_modules/node-forge/lib/des.cjs +1194 -0
  86. package/dist/cjs/node_modules/node-forge/lib/des.cjs.map +1 -0
  87. package/dist/cjs/node_modules/node-forge/lib/ed25519.cjs +1027 -0
  88. package/dist/cjs/node_modules/node-forge/lib/ed25519.cjs.map +1 -0
  89. package/dist/cjs/node_modules/node-forge/lib/forge.cjs +22 -0
  90. package/dist/cjs/node_modules/node-forge/lib/forge.cjs.map +1 -0
  91. package/dist/cjs/node_modules/node-forge/lib/hmac.cjs +114 -0
  92. package/dist/cjs/node_modules/node-forge/lib/hmac.cjs.map +1 -0
  93. package/dist/cjs/node_modules/node-forge/lib/index.cjs +73 -0
  94. package/dist/cjs/node_modules/node-forge/lib/index.cjs.map +1 -0
  95. package/dist/cjs/node_modules/node-forge/lib/jsbn.cjs +1263 -0
  96. package/dist/cjs/node_modules/node-forge/lib/jsbn.cjs.map +1 -0
  97. package/dist/cjs/node_modules/node-forge/lib/kem.cjs +153 -0
  98. package/dist/cjs/node_modules/node-forge/lib/kem.cjs.map +1 -0
  99. package/dist/cjs/node_modules/node-forge/lib/log.cjs +248 -0
  100. package/dist/cjs/node_modules/node-forge/lib/log.cjs.map +1 -0
  101. package/dist/cjs/node_modules/node-forge/lib/md.all.cjs +31 -0
  102. package/dist/cjs/node_modules/node-forge/lib/md.all.cjs.map +1 -0
  103. package/dist/cjs/node_modules/node-forge/lib/md.cjs +25 -0
  104. package/dist/cjs/node_modules/node-forge/lib/md.cjs.map +1 -0
  105. package/dist/cjs/node_modules/node-forge/lib/md5.cjs +331 -0
  106. package/dist/cjs/node_modules/node-forge/lib/md5.cjs.map +1 -0
  107. package/dist/cjs/node_modules/node-forge/lib/mgf.cjs +27 -0
  108. package/dist/cjs/node_modules/node-forge/lib/mgf.cjs.map +1 -0
  109. package/dist/cjs/node_modules/node-forge/lib/mgf1.cjs +51 -0
  110. package/dist/cjs/node_modules/node-forge/lib/mgf1.cjs.map +1 -0
  111. package/dist/cjs/node_modules/node-forge/lib/oids.cjs +160 -0
  112. package/dist/cjs/node_modules/node-forge/lib/oids.cjs.map +1 -0
  113. package/dist/cjs/node_modules/node-forge/lib/pbe.cjs +822 -0
  114. package/dist/cjs/node_modules/node-forge/lib/pbe.cjs.map +1 -0
  115. package/dist/cjs/node_modules/node-forge/lib/pbkdf2.cjs +132 -0
  116. package/dist/cjs/node_modules/node-forge/lib/pbkdf2.cjs.map +1 -0
  117. package/dist/cjs/node_modules/node-forge/lib/pem.cjs +182 -0
  118. package/dist/cjs/node_modules/node-forge/lib/pem.cjs.map +1 -0
  119. package/dist/cjs/node_modules/node-forge/lib/pkcs1.cjs +207 -0
  120. package/dist/cjs/node_modules/node-forge/lib/pkcs1.cjs.map +1 -0
  121. package/dist/cjs/node_modules/node-forge/lib/pkcs12.cjs +730 -0
  122. package/dist/cjs/node_modules/node-forge/lib/pkcs12.cjs.map +1 -0
  123. package/dist/cjs/node_modules/node-forge/lib/pkcs7.cjs +648 -0
  124. package/dist/cjs/node_modules/node-forge/lib/pkcs7.cjs.map +1 -0
  125. package/dist/cjs/node_modules/node-forge/lib/pkcs7asn1.cjs +412 -0
  126. package/dist/cjs/node_modules/node-forge/lib/pkcs7asn1.cjs.map +1 -0
  127. package/dist/cjs/node_modules/node-forge/lib/pki.cjs +108 -0
  128. package/dist/cjs/node_modules/node-forge/lib/pki.cjs.map +1 -0
  129. package/dist/cjs/node_modules/node-forge/lib/prime.cjs +200 -0
  130. package/dist/cjs/node_modules/node-forge/lib/prime.cjs.map +1 -0
  131. package/dist/cjs/node_modules/node-forge/lib/prng.cjs +297 -0
  132. package/dist/cjs/node_modules/node-forge/lib/prng.cjs.map +1 -0
  133. package/dist/cjs/node_modules/node-forge/lib/pss.cjs +148 -0
  134. package/dist/cjs/node_modules/node-forge/lib/pss.cjs.map +1 -0
  135. package/dist/cjs/node_modules/node-forge/lib/random.cjs +148 -0
  136. package/dist/cjs/node_modules/node-forge/lib/random.cjs.map +1 -0
  137. package/dist/cjs/node_modules/node-forge/lib/rc2.cjs +545 -0
  138. package/dist/cjs/node_modules/node-forge/lib/rc2.cjs.map +1 -0
  139. package/dist/cjs/node_modules/node-forge/lib/rsa.cjs +1306 -0
  140. package/dist/cjs/node_modules/node-forge/lib/rsa.cjs.map +1 -0
  141. package/dist/cjs/node_modules/node-forge/lib/sha1.cjs +237 -0
  142. package/dist/cjs/node_modules/node-forge/lib/sha1.cjs.map +1 -0
  143. package/dist/cjs/node_modules/node-forge/lib/sha256.cjs +274 -0
  144. package/dist/cjs/node_modules/node-forge/lib/sha256.cjs.map +1 -0
  145. package/dist/cjs/node_modules/node-forge/lib/sha512.cjs +420 -0
  146. package/dist/cjs/node_modules/node-forge/lib/sha512.cjs.map +1 -0
  147. package/dist/cjs/node_modules/node-forge/lib/ssh.cjs +201 -0
  148. package/dist/cjs/node_modules/node-forge/lib/ssh.cjs.map +1 -0
  149. package/dist/cjs/node_modules/node-forge/lib/tls.cjs +3662 -0
  150. package/dist/cjs/node_modules/node-forge/lib/tls.cjs.map +1 -0
  151. package/dist/cjs/node_modules/node-forge/lib/util.cjs +2124 -0
  152. package/dist/cjs/node_modules/node-forge/lib/util.cjs.map +1 -0
  153. package/dist/cjs/node_modules/node-forge/lib/x509.cjs +2171 -0
  154. package/dist/cjs/node_modules/node-forge/lib/x509.cjs.map +1 -0
  155. package/dist/cjs/node_modules/node-rsa/src/NodeRSA.cjs +341 -0
  156. package/dist/cjs/node_modules/node-rsa/src/NodeRSA.cjs.map +1 -0
  157. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/encryptEngines.cjs +26 -0
  158. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/encryptEngines.cjs.map +1 -0
  159. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/io.cjs +65 -0
  160. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/io.cjs.map +1 -0
  161. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/js.cjs +44 -0
  162. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/js.cjs.map +1 -0
  163. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/node12.cjs +49 -0
  164. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/node12.cjs.map +1 -0
  165. package/dist/cjs/node_modules/node-rsa/src/formats/components.cjs +55 -0
  166. package/dist/cjs/node_modules/node-rsa/src/formats/components.cjs.map +1 -0
  167. package/dist/cjs/node_modules/node-rsa/src/formats/formats.cjs +86 -0
  168. package/dist/cjs/node_modules/node-rsa/src/formats/formats.cjs.map +1 -0
  169. package/dist/cjs/node_modules/node-rsa/src/formats/openssh.cjs +177 -0
  170. package/dist/cjs/node_modules/node-rsa/src/formats/openssh.cjs.map +1 -0
  171. package/dist/cjs/node_modules/node-rsa/src/formats/pkcs1.cjs +104 -0
  172. package/dist/cjs/node_modules/node-rsa/src/formats/pkcs1.cjs.map +1 -0
  173. package/dist/cjs/node_modules/node-rsa/src/formats/pkcs8.cjs +131 -0
  174. package/dist/cjs/node_modules/node-rsa/src/formats/pkcs8.cjs.map +1 -0
  175. package/dist/cjs/node_modules/node-rsa/src/libs/jsbn.cjs +1347 -0
  176. package/dist/cjs/node_modules/node-rsa/src/libs/jsbn.cjs.map +1 -0
  177. package/dist/cjs/node_modules/node-rsa/src/libs/rsa.cjs +231 -0
  178. package/dist/cjs/node_modules/node-rsa/src/libs/rsa.cjs.map +1 -0
  179. package/dist/cjs/node_modules/node-rsa/src/schemes/oaep.cjs +123 -0
  180. package/dist/cjs/node_modules/node-rsa/src/schemes/oaep.cjs.map +1 -0
  181. package/dist/cjs/node_modules/node-rsa/src/schemes/pkcs1.cjs +175 -0
  182. package/dist/cjs/node_modules/node-rsa/src/schemes/pkcs1.cjs.map +1 -0
  183. package/dist/cjs/node_modules/node-rsa/src/schemes/pss.cjs +123 -0
  184. package/dist/cjs/node_modules/node-rsa/src/schemes/pss.cjs.map +1 -0
  185. package/dist/cjs/node_modules/node-rsa/src/schemes/schemes.cjs +28 -0
  186. package/dist/cjs/node_modules/node-rsa/src/schemes/schemes.cjs.map +1 -0
  187. package/dist/cjs/node_modules/node-rsa/src/utils.cjs +84 -0
  188. package/dist/cjs/node_modules/node-rsa/src/utils.cjs.map +1 -0
  189. package/dist/cjs/node_modules/pako/index.cjs +25 -0
  190. package/dist/cjs/node_modules/pako/index.cjs.map +1 -0
  191. package/dist/cjs/node_modules/pako/lib/deflate.cjs +311 -0
  192. package/dist/cjs/node_modules/pako/lib/deflate.cjs.map +1 -0
  193. package/dist/cjs/node_modules/pako/lib/inflate.cjs +317 -0
  194. package/dist/cjs/node_modules/pako/lib/inflate.cjs.map +1 -0
  195. package/dist/cjs/node_modules/pako/lib/utils/common.cjs +77 -0
  196. package/dist/cjs/node_modules/pako/lib/utils/common.cjs.map +1 -0
  197. package/dist/cjs/node_modules/pako/lib/utils/strings.cjs +131 -0
  198. package/dist/cjs/node_modules/pako/lib/utils/strings.cjs.map +1 -0
  199. package/dist/cjs/node_modules/pako/lib/zlib/adler32.cjs +29 -0
  200. package/dist/cjs/node_modules/pako/lib/zlib/adler32.cjs.map +1 -0
  201. package/dist/cjs/node_modules/pako/lib/zlib/constants.cjs +43 -0
  202. package/dist/cjs/node_modules/pako/lib/zlib/constants.cjs.map +1 -0
  203. package/dist/cjs/node_modules/pako/lib/zlib/crc32.cjs +31 -0
  204. package/dist/cjs/node_modules/pako/lib/zlib/crc32.cjs.map +1 -0
  205. package/dist/cjs/node_modules/pako/lib/zlib/deflate.cjs +889 -0
  206. package/dist/cjs/node_modules/pako/lib/zlib/deflate.cjs.map +1 -0
  207. package/dist/cjs/node_modules/pako/lib/zlib/gzheader.cjs +27 -0
  208. package/dist/cjs/node_modules/pako/lib/zlib/gzheader.cjs.map +1 -0
  209. package/dist/cjs/node_modules/pako/lib/zlib/inffast.cjs +227 -0
  210. package/dist/cjs/node_modules/pako/lib/zlib/inffast.cjs.map +1 -0
  211. package/dist/cjs/node_modules/pako/lib/zlib/inflate.cjs +1038 -0
  212. package/dist/cjs/node_modules/pako/lib/zlib/inflate.cjs.map +1 -0
  213. package/dist/cjs/node_modules/pako/lib/zlib/inftrees.cjs +278 -0
  214. package/dist/cjs/node_modules/pako/lib/zlib/inftrees.cjs.map +1 -0
  215. package/dist/cjs/node_modules/pako/lib/zlib/messages.cjs +25 -0
  216. package/dist/cjs/node_modules/pako/lib/zlib/messages.cjs.map +1 -0
  217. package/dist/cjs/node_modules/pako/lib/zlib/trees.cjs +626 -0
  218. package/dist/cjs/node_modules/pako/lib/zlib/trees.cjs.map +1 -0
  219. package/dist/cjs/node_modules/pako/lib/zlib/zstream.cjs +29 -0
  220. package/dist/cjs/node_modules/pako/lib/zlib/zstream.cjs.map +1 -0
  221. package/dist/cjs/node_modules/safer-buffer/safer.cjs +52 -0
  222. package/dist/cjs/node_modules/safer-buffer/safer.cjs.map +1 -0
  223. package/dist/cjs/node_modules/samlify/build/index.cjs +120 -0
  224. package/dist/cjs/node_modules/samlify/build/index.cjs.map +1 -0
  225. package/dist/cjs/node_modules/samlify/build/src/api.cjs +36 -0
  226. package/dist/cjs/node_modules/samlify/build/src/api.cjs.map +1 -0
  227. package/dist/cjs/node_modules/samlify/build/src/binding-post.cjs +507 -0
  228. package/dist/cjs/node_modules/samlify/build/src/binding-post.cjs.map +1 -0
  229. package/dist/cjs/node_modules/samlify/build/src/binding-redirect.cjs +342 -0
  230. package/dist/cjs/node_modules/samlify/build/src/binding-redirect.cjs.map +1 -0
  231. package/dist/cjs/node_modules/samlify/build/src/binding-simplesign.cjs +361 -0
  232. package/dist/cjs/node_modules/samlify/build/src/binding-simplesign.cjs.map +1 -0
  233. package/dist/cjs/node_modules/samlify/build/src/entity-idp.cjs +282 -0
  234. package/dist/cjs/node_modules/samlify/build/src/entity-idp.cjs.map +1 -0
  235. package/dist/cjs/node_modules/samlify/build/src/entity-sp.cjs +145 -0
  236. package/dist/cjs/node_modules/samlify/build/src/entity-sp.cjs.map +1 -0
  237. package/dist/cjs/node_modules/samlify/build/src/entity.cjs +256 -0
  238. package/dist/cjs/node_modules/samlify/build/src/entity.cjs.map +1 -0
  239. package/dist/cjs/node_modules/samlify/build/src/extractor.cjs +355 -0
  240. package/dist/cjs/node_modules/samlify/build/src/extractor.cjs.map +1 -0
  241. package/dist/cjs/node_modules/samlify/build/src/flow.cjs +392 -0
  242. package/dist/cjs/node_modules/samlify/build/src/flow.cjs.map +1 -0
  243. package/dist/cjs/node_modules/samlify/build/src/libsaml.cjs +547 -0
  244. package/dist/cjs/node_modules/samlify/build/src/libsaml.cjs.map +1 -0
  245. package/dist/cjs/node_modules/samlify/build/src/metadata-idp.cjs +174 -0
  246. package/dist/cjs/node_modules/samlify/build/src/metadata-idp.cjs.map +1 -0
  247. package/dist/cjs/node_modules/samlify/build/src/metadata-sp.cjs +217 -0
  248. package/dist/cjs/node_modules/samlify/build/src/metadata-sp.cjs.map +1 -0
  249. package/dist/cjs/node_modules/samlify/build/src/metadata.cjs +203 -0
  250. package/dist/cjs/node_modules/samlify/build/src/metadata.cjs.map +1 -0
  251. package/dist/cjs/node_modules/samlify/build/src/urn.cjs +228 -0
  252. package/dist/cjs/node_modules/samlify/build/src/urn.cjs.map +1 -0
  253. package/dist/cjs/node_modules/samlify/build/src/utility.cjs +280 -0
  254. package/dist/cjs/node_modules/samlify/build/src/utility.cjs.map +1 -0
  255. package/dist/cjs/node_modules/samlify/build/src/validator.cjs +56 -0
  256. package/dist/cjs/node_modules/samlify/build/src/validator.cjs.map +1 -0
  257. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/index.cjs +50 -0
  258. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/index.cjs.map +1 -0
  259. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/md5.cjs +25 -0
  260. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/md5.cjs.map +1 -0
  261. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/nil.cjs +18 -0
  262. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/nil.cjs.map +1 -0
  263. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/parse.cjs +42 -0
  264. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/parse.cjs.map +1 -0
  265. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/regex.cjs +18 -0
  266. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/regex.cjs.map +1 -0
  267. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/rng.cjs +28 -0
  268. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/rng.cjs.map +1 -0
  269. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/sha1.cjs +25 -0
  270. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/sha1.cjs.map +1 -0
  271. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/stringify.cjs +27 -0
  272. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/stringify.cjs.map +1 -0
  273. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v1.cjs +69 -0
  274. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v1.cjs.map +1 -0
  275. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v3.cjs +23 -0
  276. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v3.cjs.map +1 -0
  277. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v35.cjs +54 -0
  278. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v35.cjs.map +1 -0
  279. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v4.cjs +34 -0
  280. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v4.cjs.map +1 -0
  281. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v5.cjs +23 -0
  282. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v5.cjs.map +1 -0
  283. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/validate.cjs +23 -0
  284. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/validate.cjs.map +1 -0
  285. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/version.cjs +24 -0
  286. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/version.cjs.map +1 -0
  287. package/dist/cjs/node_modules/xml/lib/escapeForXML.cjs +27 -0
  288. package/dist/cjs/node_modules/xml/lib/escapeForXML.cjs.map +1 -0
  289. package/dist/cjs/node_modules/xml/lib/xml.cjs +186 -0
  290. package/dist/cjs/node_modules/xml/lib/xml.cjs.map +1 -0
  291. package/dist/cjs/node_modules/xml-crypto/lib/c14n-canonicalization.cjs +202 -0
  292. package/dist/cjs/node_modules/xml-crypto/lib/c14n-canonicalization.cjs.map +1 -0
  293. package/dist/cjs/node_modules/xml-crypto/lib/enveloped-signature.cjs +52 -0
  294. package/dist/cjs/node_modules/xml-crypto/lib/enveloped-signature.cjs.map +1 -0
  295. package/dist/cjs/node_modules/xml-crypto/lib/exclusive-canonicalization.cjs +223 -0
  296. package/dist/cjs/node_modules/xml-crypto/lib/exclusive-canonicalization.cjs.map +1 -0
  297. package/dist/cjs/node_modules/xml-crypto/lib/hash-algorithms.cjs +56 -0
  298. package/dist/cjs/node_modules/xml-crypto/lib/hash-algorithms.cjs.map +1 -0
  299. package/dist/cjs/node_modules/xml-crypto/lib/index.cjs +73 -0
  300. package/dist/cjs/node_modules/xml-crypto/lib/index.cjs.map +1 -0
  301. package/dist/cjs/node_modules/xml-crypto/lib/signature-algorithms.cjs +91 -0
  302. package/dist/cjs/node_modules/xml-crypto/lib/signature-algorithms.cjs.map +1 -0
  303. package/dist/cjs/node_modules/xml-crypto/lib/signed-xml.cjs +695 -0
  304. package/dist/cjs/node_modules/xml-crypto/lib/signed-xml.cjs.map +1 -0
  305. package/dist/cjs/node_modules/xml-crypto/lib/types.cjs +58 -0
  306. package/dist/cjs/node_modules/xml-crypto/lib/types.cjs.map +1 -0
  307. package/dist/cjs/node_modules/xml-crypto/lib/utils.cjs +213 -0
  308. package/dist/cjs/node_modules/xml-crypto/lib/utils.cjs.map +1 -0
  309. package/dist/cjs/node_modules/xml-crypto/node_modules/xpath/xpath.cjs +3445 -0
  310. package/dist/cjs/node_modules/xml-crypto/node_modules/xpath/xpath.cjs.map +1 -0
  311. package/dist/cjs/node_modules/xml-escape/index.cjs +30 -0
  312. package/dist/cjs/node_modules/xml-escape/index.cjs.map +1 -0
  313. package/dist/cjs/node_modules/xpath/xpath.cjs +3410 -0
  314. package/dist/cjs/node_modules/xpath/xpath.cjs.map +1 -0
  315. package/dist/cjs/node_modules/zod/v4/classic/errors.cjs +31 -0
  316. package/dist/cjs/node_modules/zod/v4/classic/errors.cjs.map +1 -0
  317. package/dist/cjs/node_modules/zod/v4/classic/iso.cjs +42 -0
  318. package/dist/cjs/node_modules/zod/v4/classic/iso.cjs.map +1 -0
  319. package/dist/cjs/node_modules/zod/v4/classic/parse.cjs +32 -0
  320. package/dist/cjs/node_modules/zod/v4/classic/parse.cjs.map +1 -0
  321. package/dist/cjs/node_modules/zod/v4/classic/schemas.cjs +527 -0
  322. package/dist/cjs/node_modules/zod/v4/classic/schemas.cjs.map +1 -0
  323. package/dist/cjs/node_modules/zod/v4/core/api.cjs +443 -0
  324. package/dist/cjs/node_modules/zod/v4/core/api.cjs.map +1 -0
  325. package/dist/cjs/node_modules/zod/v4/core/checks.cjs +238 -0
  326. package/dist/cjs/node_modules/zod/v4/core/checks.cjs.map +1 -0
  327. package/dist/cjs/node_modules/zod/v4/core/core.cjs +63 -0
  328. package/dist/cjs/node_modules/zod/v4/core/core.cjs.map +1 -0
  329. package/dist/cjs/node_modules/zod/v4/core/doc.cjs +36 -0
  330. package/dist/cjs/node_modules/zod/v4/core/doc.cjs.map +1 -0
  331. package/dist/cjs/node_modules/zod/v4/core/errors.cjs +67 -0
  332. package/dist/cjs/node_modules/zod/v4/core/errors.cjs.map +1 -0
  333. package/dist/cjs/node_modules/zod/v4/core/parse.cjs +124 -0
  334. package/dist/cjs/node_modules/zod/v4/core/parse.cjs.map +1 -0
  335. package/dist/cjs/node_modules/zod/v4/core/regexes.cjs +87 -0
  336. package/dist/cjs/node_modules/zod/v4/core/regexes.cjs.map +1 -0
  337. package/dist/cjs/node_modules/zod/v4/core/registries.cjs +55 -0
  338. package/dist/cjs/node_modules/zod/v4/core/registries.cjs.map +1 -0
  339. package/dist/cjs/node_modules/zod/v4/core/schemas.cjs +1115 -0
  340. package/dist/cjs/node_modules/zod/v4/core/schemas.cjs.map +1 -0
  341. package/dist/cjs/node_modules/zod/v4/core/util.cjs +333 -0
  342. package/dist/cjs/node_modules/zod/v4/core/util.cjs.map +1 -0
  343. package/dist/cjs/node_modules/zod/v4/core/versions.cjs +12 -0
  344. package/dist/cjs/node_modules/zod/v4/core/versions.cjs.map +1 -0
  345. package/dist/cjs/schemas/user.schema.cjs +17 -0
  346. package/dist/cjs/schemas/user.schema.cjs.map +1 -1
  347. package/dist/cjs/services/dictionary.service.cjs +7 -31
  348. package/dist/cjs/services/dictionary.service.cjs.map +1 -1
  349. package/dist/cjs/services/email.service.cjs +13 -0
  350. package/dist/cjs/services/email.service.cjs.map +1 -1
  351. package/dist/cjs/types/user.types.cjs.map +1 -1
  352. package/dist/cjs/utils/auth/getAuth.cjs +60 -26
  353. package/dist/cjs/utils/auth/getAuth.cjs.map +1 -1
  354. package/dist/cjs/utils/mongoDB/connectDB.cjs.map +1 -1
  355. package/dist/esm/_virtual/rolldown_runtime.mjs +43 -0
  356. package/dist/esm/controllers/dictionary.controller.mjs +65 -42
  357. package/dist/esm/controllers/dictionary.controller.mjs.map +1 -1
  358. package/dist/esm/emails/MagicLinkEmail.mjs +239 -0
  359. package/dist/esm/emails/MagicLinkEmail.mjs.map +1 -0
  360. package/dist/esm/index.mjs +1 -1
  361. package/dist/esm/index.mjs.map +1 -1
  362. package/dist/esm/node_modules/@authenio/xml-encryption/lib/index.mjs +13 -0
  363. package/dist/esm/node_modules/@authenio/xml-encryption/lib/index.mjs.map +1 -0
  364. package/dist/esm/node_modules/@authenio/xml-encryption/lib/templates/encrypted-key.tpl.xml.mjs +22 -0
  365. package/dist/esm/node_modules/@authenio/xml-encryption/lib/templates/encrypted-key.tpl.xml.mjs.map +1 -0
  366. package/dist/esm/node_modules/@authenio/xml-encryption/lib/templates/keyinfo.tpl.xml.mjs +28 -0
  367. package/dist/esm/node_modules/@authenio/xml-encryption/lib/templates/keyinfo.tpl.xml.mjs.map +1 -0
  368. package/dist/esm/node_modules/@authenio/xml-encryption/lib/utils.mjs +35 -0
  369. package/dist/esm/node_modules/@authenio/xml-encryption/lib/utils.mjs.map +1 -0
  370. package/dist/esm/node_modules/@authenio/xml-encryption/lib/xmlenc.mjs +228 -0
  371. package/dist/esm/node_modules/@authenio/xml-encryption/lib/xmlenc.mjs.map +1 -0
  372. package/dist/esm/node_modules/@better-auth/sso/dist/index.mjs +1210 -0
  373. package/dist/esm/node_modules/@better-auth/sso/dist/index.mjs.map +1 -0
  374. package/dist/esm/node_modules/@better-fetch/fetch/dist/index.mjs +359 -0
  375. package/dist/esm/node_modules/@better-fetch/fetch/dist/index.mjs.map +1 -0
  376. package/dist/esm/node_modules/@xmldom/is-dom-node/dist/index.mjs +86 -0
  377. package/dist/esm/node_modules/@xmldom/is-dom-node/dist/index.mjs.map +1 -0
  378. package/dist/esm/node_modules/@xmldom/xmldom/lib/conventions.mjs +107 -0
  379. package/dist/esm/node_modules/@xmldom/xmldom/lib/conventions.mjs.map +1 -0
  380. package/dist/esm/node_modules/@xmldom/xmldom/lib/dom-parser.mjs +245 -0
  381. package/dist/esm/node_modules/@xmldom/xmldom/lib/dom-parser.mjs.map +1 -0
  382. package/dist/esm/node_modules/@xmldom/xmldom/lib/dom.mjs +1306 -0
  383. package/dist/esm/node_modules/@xmldom/xmldom/lib/dom.mjs.map +1 -0
  384. package/dist/esm/node_modules/@xmldom/xmldom/lib/entities.mjs +2173 -0
  385. package/dist/esm/node_modules/@xmldom/xmldom/lib/entities.mjs.map +1 -0
  386. package/dist/esm/node_modules/@xmldom/xmldom/lib/index.mjs +17 -0
  387. package/dist/esm/node_modules/@xmldom/xmldom/lib/index.mjs.map +1 -0
  388. package/dist/esm/node_modules/@xmldom/xmldom/lib/sax.mjs +496 -0
  389. package/dist/esm/node_modules/@xmldom/xmldom/lib/sax.mjs.map +1 -0
  390. package/dist/esm/node_modules/asn1/lib/ber/errors.mjs +17 -0
  391. package/dist/esm/node_modules/asn1/lib/ber/errors.mjs.map +1 -0
  392. package/dist/esm/node_modules/asn1/lib/ber/index.mjs +25 -0
  393. package/dist/esm/node_modules/asn1/lib/ber/index.mjs.map +1 -0
  394. package/dist/esm/node_modules/asn1/lib/ber/reader.mjs +164 -0
  395. package/dist/esm/node_modules/asn1/lib/ber/reader.mjs.map +1 -0
  396. package/dist/esm/node_modules/asn1/lib/ber/types.mjs +44 -0
  397. package/dist/esm/node_modules/asn1/lib/ber/types.mjs.map +1 -0
  398. package/dist/esm/node_modules/asn1/lib/ber/writer.mjs +220 -0
  399. package/dist/esm/node_modules/asn1/lib/ber/writer.mjs.map +1 -0
  400. package/dist/esm/node_modules/asn1/lib/index.mjs +18 -0
  401. package/dist/esm/node_modules/asn1/lib/index.mjs.map +1 -0
  402. package/dist/esm/node_modules/available-typed-arrays/index.mjs +20 -0
  403. package/dist/esm/node_modules/available-typed-arrays/index.mjs.map +1 -0
  404. package/dist/esm/node_modules/base64-js/index.mjs +95 -0
  405. package/dist/esm/node_modules/base64-js/index.mjs.map +1 -0
  406. package/dist/esm/node_modules/buffer/index.mjs +1114 -0
  407. package/dist/esm/node_modules/buffer/index.mjs.map +1 -0
  408. package/dist/esm/node_modules/call-bind/index.mjs +26 -0
  409. package/dist/esm/node_modules/call-bind/index.mjs.map +1 -0
  410. package/dist/esm/node_modules/call-bind-apply-helpers/actualApply.mjs +21 -0
  411. package/dist/esm/node_modules/call-bind-apply-helpers/actualApply.mjs.map +1 -0
  412. package/dist/esm/node_modules/call-bind-apply-helpers/applyBind.mjs +21 -0
  413. package/dist/esm/node_modules/call-bind-apply-helpers/applyBind.mjs.map +1 -0
  414. package/dist/esm/node_modules/call-bind-apply-helpers/functionApply.mjs +13 -0
  415. package/dist/esm/node_modules/call-bind-apply-helpers/functionApply.mjs.map +1 -0
  416. package/dist/esm/node_modules/call-bind-apply-helpers/functionCall.mjs +13 -0
  417. package/dist/esm/node_modules/call-bind-apply-helpers/functionCall.mjs.map +1 -0
  418. package/dist/esm/node_modules/call-bind-apply-helpers/index.mjs +24 -0
  419. package/dist/esm/node_modules/call-bind-apply-helpers/index.mjs.map +1 -0
  420. package/dist/esm/node_modules/call-bind-apply-helpers/reflectApply.mjs +13 -0
  421. package/dist/esm/node_modules/call-bind-apply-helpers/reflectApply.mjs.map +1 -0
  422. package/dist/esm/node_modules/call-bound/index.mjs +23 -0
  423. package/dist/esm/node_modules/call-bound/index.mjs.map +1 -0
  424. package/dist/esm/node_modules/camelcase/index.mjs +75 -0
  425. package/dist/esm/node_modules/camelcase/index.mjs.map +1 -0
  426. package/dist/esm/node_modules/define-data-property/index.mjs +41 -0
  427. package/dist/esm/node_modules/define-data-property/index.mjs.map +1 -0
  428. package/dist/esm/node_modules/dunder-proto/get.mjs +28 -0
  429. package/dist/esm/node_modules/dunder-proto/get.mjs.map +1 -0
  430. package/dist/esm/node_modules/es-define-property/index.mjs +19 -0
  431. package/dist/esm/node_modules/es-define-property/index.mjs.map +1 -0
  432. package/dist/esm/node_modules/es-errors/eval.mjs +13 -0
  433. package/dist/esm/node_modules/es-errors/eval.mjs.map +1 -0
  434. package/dist/esm/node_modules/es-errors/index.mjs +13 -0
  435. package/dist/esm/node_modules/es-errors/index.mjs.map +1 -0
  436. package/dist/esm/node_modules/es-errors/range.mjs +13 -0
  437. package/dist/esm/node_modules/es-errors/range.mjs.map +1 -0
  438. package/dist/esm/node_modules/es-errors/ref.mjs +13 -0
  439. package/dist/esm/node_modules/es-errors/ref.mjs.map +1 -0
  440. package/dist/esm/node_modules/es-errors/syntax.mjs +13 -0
  441. package/dist/esm/node_modules/es-errors/syntax.mjs.map +1 -0
  442. package/dist/esm/node_modules/es-errors/type.mjs +13 -0
  443. package/dist/esm/node_modules/es-errors/type.mjs.map +1 -0
  444. package/dist/esm/node_modules/es-errors/uri.mjs +13 -0
  445. package/dist/esm/node_modules/es-errors/uri.mjs.map +1 -0
  446. package/dist/esm/node_modules/es-object-atoms/index.mjs +13 -0
  447. package/dist/esm/node_modules/es-object-atoms/index.mjs.map +1 -0
  448. package/dist/esm/node_modules/escape-html/index.mjs +68 -0
  449. package/dist/esm/node_modules/escape-html/index.mjs.map +1 -0
  450. package/dist/esm/node_modules/fast-xml-parser/src/fxp.mjs +8 -0
  451. package/dist/esm/node_modules/fast-xml-parser/src/fxp.mjs.map +1 -0
  452. package/dist/esm/node_modules/fast-xml-parser/src/util.mjs +26 -0
  453. package/dist/esm/node_modules/fast-xml-parser/src/util.mjs.map +1 -0
  454. package/dist/esm/node_modules/fast-xml-parser/src/validator.mjs +243 -0
  455. package/dist/esm/node_modules/fast-xml-parser/src/validator.mjs.map +1 -0
  456. package/dist/esm/node_modules/for-each/index.mjs +43 -0
  457. package/dist/esm/node_modules/for-each/index.mjs.map +1 -0
  458. package/dist/esm/node_modules/function-bind/implementation.mjs +59 -0
  459. package/dist/esm/node_modules/function-bind/implementation.mjs.map +1 -0
  460. package/dist/esm/node_modules/function-bind/index.mjs +14 -0
  461. package/dist/esm/node_modules/function-bind/index.mjs.map +1 -0
  462. package/dist/esm/node_modules/generator-function/index.mjs +14 -0
  463. package/dist/esm/node_modules/generator-function/index.mjs.map +1 -0
  464. package/dist/esm/node_modules/get-intrinsic/index.mjs +358 -0
  465. package/dist/esm/node_modules/get-intrinsic/index.mjs.map +1 -0
  466. package/dist/esm/node_modules/get-proto/Object.getPrototypeOf.mjs +15 -0
  467. package/dist/esm/node_modules/get-proto/Object.getPrototypeOf.mjs.map +1 -0
  468. package/dist/esm/node_modules/get-proto/Reflect.getPrototypeOf.mjs +13 -0
  469. package/dist/esm/node_modules/get-proto/Reflect.getPrototypeOf.mjs.map +1 -0
  470. package/dist/esm/node_modules/get-proto/index.mjs +26 -0
  471. package/dist/esm/node_modules/get-proto/index.mjs.map +1 -0
  472. package/dist/esm/node_modules/gopd/gOPD.mjs +13 -0
  473. package/dist/esm/node_modules/gopd/gOPD.mjs.map +1 -0
  474. package/dist/esm/node_modules/gopd/index.mjs +20 -0
  475. package/dist/esm/node_modules/gopd/index.mjs.map +1 -0
  476. package/dist/esm/node_modules/has-property-descriptors/index.mjs +25 -0
  477. package/dist/esm/node_modules/has-property-descriptors/index.mjs.map +1 -0
  478. package/dist/esm/node_modules/has-symbols/index.mjs +22 -0
  479. package/dist/esm/node_modules/has-symbols/index.mjs.map +1 -0
  480. package/dist/esm/node_modules/has-symbols/shams.mjs +36 -0
  481. package/dist/esm/node_modules/has-symbols/shams.mjs.map +1 -0
  482. package/dist/esm/node_modules/has-tostringtag/shams.mjs +17 -0
  483. package/dist/esm/node_modules/has-tostringtag/shams.mjs.map +1 -0
  484. package/dist/esm/node_modules/hasown/index.mjs +17 -0
  485. package/dist/esm/node_modules/hasown/index.mjs.map +1 -0
  486. package/dist/esm/node_modules/ieee754/index.mjs +80 -0
  487. package/dist/esm/node_modules/ieee754/index.mjs.map +1 -0
  488. package/dist/esm/node_modules/inherits/inherits_browser.mjs +31 -0
  489. package/dist/esm/node_modules/inherits/inherits_browser.mjs.map +1 -0
  490. package/dist/esm/node_modules/is-arguments/index.mjs +31 -0
  491. package/dist/esm/node_modules/is-arguments/index.mjs.map +1 -0
  492. package/dist/esm/node_modules/is-callable/index.mjs +87 -0
  493. package/dist/esm/node_modules/is-callable/index.mjs.map +1 -0
  494. package/dist/esm/node_modules/is-generator-function/index.mjs +32 -0
  495. package/dist/esm/node_modules/is-generator-function/index.mjs.map +1 -0
  496. package/dist/esm/node_modules/is-regex/index.mjs +58 -0
  497. package/dist/esm/node_modules/is-regex/index.mjs.map +1 -0
  498. package/dist/esm/node_modules/is-typed-array/index.mjs +17 -0
  499. package/dist/esm/node_modules/is-typed-array/index.mjs.map +1 -0
  500. package/dist/esm/node_modules/jose/dist/webapi/lib/base64.mjs +12 -0
  501. package/dist/esm/node_modules/jose/dist/webapi/lib/base64.mjs.map +1 -0
  502. package/dist/esm/node_modules/jose/dist/webapi/lib/buffer_utils.mjs +8 -0
  503. package/dist/esm/node_modules/jose/dist/webapi/lib/buffer_utils.mjs.map +1 -0
  504. package/dist/esm/node_modules/jose/dist/webapi/lib/is_object.mjs +15 -0
  505. package/dist/esm/node_modules/jose/dist/webapi/lib/is_object.mjs.map +1 -0
  506. package/dist/esm/node_modules/jose/dist/webapi/util/base64url.mjs +19 -0
  507. package/dist/esm/node_modules/jose/dist/webapi/util/base64url.mjs.map +1 -0
  508. package/dist/esm/node_modules/jose/dist/webapi/util/decode_jwt.mjs +31 -0
  509. package/dist/esm/node_modules/jose/dist/webapi/util/decode_jwt.mjs.map +1 -0
  510. package/dist/esm/node_modules/jose/dist/webapi/util/errors.mjs +26 -0
  511. package/dist/esm/node_modules/jose/dist/webapi/util/errors.mjs.map +1 -0
  512. package/dist/esm/node_modules/math-intrinsics/abs.mjs +13 -0
  513. package/dist/esm/node_modules/math-intrinsics/abs.mjs.map +1 -0
  514. package/dist/esm/node_modules/math-intrinsics/floor.mjs +13 -0
  515. package/dist/esm/node_modules/math-intrinsics/floor.mjs.map +1 -0
  516. package/dist/esm/node_modules/math-intrinsics/isNaN.mjs +15 -0
  517. package/dist/esm/node_modules/math-intrinsics/isNaN.mjs.map +1 -0
  518. package/dist/esm/node_modules/math-intrinsics/max.mjs +13 -0
  519. package/dist/esm/node_modules/math-intrinsics/max.mjs.map +1 -0
  520. package/dist/esm/node_modules/math-intrinsics/min.mjs +13 -0
  521. package/dist/esm/node_modules/math-intrinsics/min.mjs.map +1 -0
  522. package/dist/esm/node_modules/math-intrinsics/pow.mjs +13 -0
  523. package/dist/esm/node_modules/math-intrinsics/pow.mjs.map +1 -0
  524. package/dist/esm/node_modules/math-intrinsics/round.mjs +13 -0
  525. package/dist/esm/node_modules/math-intrinsics/round.mjs.map +1 -0
  526. package/dist/esm/node_modules/math-intrinsics/sign.mjs +18 -0
  527. package/dist/esm/node_modules/math-intrinsics/sign.mjs.map +1 -0
  528. package/dist/esm/node_modules/node-forge/lib/aes.mjs +601 -0
  529. package/dist/esm/node_modules/node-forge/lib/aes.mjs.map +1 -0
  530. package/dist/esm/node_modules/node-forge/lib/aesCipherSuites.mjs +199 -0
  531. package/dist/esm/node_modules/node-forge/lib/aesCipherSuites.mjs.map +1 -0
  532. package/dist/esm/node_modules/node-forge/lib/asn1-validator.mjs +80 -0
  533. package/dist/esm/node_modules/node-forge/lib/asn1-validator.mjs.map +1 -0
  534. package/dist/esm/node_modules/node-forge/lib/asn1.mjs +942 -0
  535. package/dist/esm/node_modules/node-forge/lib/asn1.mjs.map +1 -0
  536. package/dist/esm/node_modules/node-forge/lib/baseN.mjs +141 -0
  537. package/dist/esm/node_modules/node-forge/lib/baseN.mjs.map +1 -0
  538. package/dist/esm/node_modules/node-forge/lib/cipher.mjs +190 -0
  539. package/dist/esm/node_modules/node-forge/lib/cipher.mjs.map +1 -0
  540. package/dist/esm/node_modules/node-forge/lib/cipherModes.mjs +601 -0
  541. package/dist/esm/node_modules/node-forge/lib/cipherModes.mjs.map +1 -0
  542. package/dist/esm/node_modules/node-forge/lib/des.mjs +1191 -0
  543. package/dist/esm/node_modules/node-forge/lib/des.mjs.map +1 -0
  544. package/dist/esm/node_modules/node-forge/lib/ed25519.mjs +1024 -0
  545. package/dist/esm/node_modules/node-forge/lib/ed25519.mjs.map +1 -0
  546. package/dist/esm/node_modules/node-forge/lib/forge.mjs +19 -0
  547. package/dist/esm/node_modules/node-forge/lib/forge.mjs.map +1 -0
  548. package/dist/esm/node_modules/node-forge/lib/hmac.mjs +111 -0
  549. package/dist/esm/node_modules/node-forge/lib/hmac.mjs.map +1 -0
  550. package/dist/esm/node_modules/node-forge/lib/index.mjs +70 -0
  551. package/dist/esm/node_modules/node-forge/lib/index.mjs.map +1 -0
  552. package/dist/esm/node_modules/node-forge/lib/jsbn.mjs +1260 -0
  553. package/dist/esm/node_modules/node-forge/lib/jsbn.mjs.map +1 -0
  554. package/dist/esm/node_modules/node-forge/lib/kem.mjs +150 -0
  555. package/dist/esm/node_modules/node-forge/lib/kem.mjs.map +1 -0
  556. package/dist/esm/node_modules/node-forge/lib/log.mjs +245 -0
  557. package/dist/esm/node_modules/node-forge/lib/log.mjs.map +1 -0
  558. package/dist/esm/node_modules/node-forge/lib/md.all.mjs +28 -0
  559. package/dist/esm/node_modules/node-forge/lib/md.all.mjs.map +1 -0
  560. package/dist/esm/node_modules/node-forge/lib/md.mjs +22 -0
  561. package/dist/esm/node_modules/node-forge/lib/md.mjs.map +1 -0
  562. package/dist/esm/node_modules/node-forge/lib/md5.mjs +328 -0
  563. package/dist/esm/node_modules/node-forge/lib/md5.mjs.map +1 -0
  564. package/dist/esm/node_modules/node-forge/lib/mgf.mjs +24 -0
  565. package/dist/esm/node_modules/node-forge/lib/mgf.mjs.map +1 -0
  566. package/dist/esm/node_modules/node-forge/lib/mgf1.mjs +48 -0
  567. package/dist/esm/node_modules/node-forge/lib/mgf1.mjs.map +1 -0
  568. package/dist/esm/node_modules/node-forge/lib/oids.mjs +157 -0
  569. package/dist/esm/node_modules/node-forge/lib/oids.mjs.map +1 -0
  570. package/dist/esm/node_modules/node-forge/lib/pbe.mjs +819 -0
  571. package/dist/esm/node_modules/node-forge/lib/pbe.mjs.map +1 -0
  572. package/dist/esm/node_modules/node-forge/lib/pbkdf2.mjs +130 -0
  573. package/dist/esm/node_modules/node-forge/lib/pbkdf2.mjs.map +1 -0
  574. package/dist/esm/node_modules/node-forge/lib/pem.mjs +179 -0
  575. package/dist/esm/node_modules/node-forge/lib/pem.mjs.map +1 -0
  576. package/dist/esm/node_modules/node-forge/lib/pkcs1.mjs +204 -0
  577. package/dist/esm/node_modules/node-forge/lib/pkcs1.mjs.map +1 -0
  578. package/dist/esm/node_modules/node-forge/lib/pkcs12.mjs +727 -0
  579. package/dist/esm/node_modules/node-forge/lib/pkcs12.mjs.map +1 -0
  580. package/dist/esm/node_modules/node-forge/lib/pkcs7.mjs +645 -0
  581. package/dist/esm/node_modules/node-forge/lib/pkcs7.mjs.map +1 -0
  582. package/dist/esm/node_modules/node-forge/lib/pkcs7asn1.mjs +409 -0
  583. package/dist/esm/node_modules/node-forge/lib/pkcs7asn1.mjs.map +1 -0
  584. package/dist/esm/node_modules/node-forge/lib/pki.mjs +105 -0
  585. package/dist/esm/node_modules/node-forge/lib/pki.mjs.map +1 -0
  586. package/dist/esm/node_modules/node-forge/lib/prime.mjs +197 -0
  587. package/dist/esm/node_modules/node-forge/lib/prime.mjs.map +1 -0
  588. package/dist/esm/node_modules/node-forge/lib/prng.mjs +295 -0
  589. package/dist/esm/node_modules/node-forge/lib/prng.mjs.map +1 -0
  590. package/dist/esm/node_modules/node-forge/lib/pss.mjs +145 -0
  591. package/dist/esm/node_modules/node-forge/lib/pss.mjs.map +1 -0
  592. package/dist/esm/node_modules/node-forge/lib/random.mjs +145 -0
  593. package/dist/esm/node_modules/node-forge/lib/random.mjs.map +1 -0
  594. package/dist/esm/node_modules/node-forge/lib/rc2.mjs +542 -0
  595. package/dist/esm/node_modules/node-forge/lib/rc2.mjs.map +1 -0
  596. package/dist/esm/node_modules/node-forge/lib/rsa.mjs +1304 -0
  597. package/dist/esm/node_modules/node-forge/lib/rsa.mjs.map +1 -0
  598. package/dist/esm/node_modules/node-forge/lib/sha1.mjs +234 -0
  599. package/dist/esm/node_modules/node-forge/lib/sha1.mjs.map +1 -0
  600. package/dist/esm/node_modules/node-forge/lib/sha256.mjs +271 -0
  601. package/dist/esm/node_modules/node-forge/lib/sha256.mjs.map +1 -0
  602. package/dist/esm/node_modules/node-forge/lib/sha512.mjs +417 -0
  603. package/dist/esm/node_modules/node-forge/lib/sha512.mjs.map +1 -0
  604. package/dist/esm/node_modules/node-forge/lib/ssh.mjs +198 -0
  605. package/dist/esm/node_modules/node-forge/lib/ssh.mjs.map +1 -0
  606. package/dist/esm/node_modules/node-forge/lib/tls.mjs +3659 -0
  607. package/dist/esm/node_modules/node-forge/lib/tls.mjs.map +1 -0
  608. package/dist/esm/node_modules/node-forge/lib/util.mjs +2121 -0
  609. package/dist/esm/node_modules/node-forge/lib/util.mjs.map +1 -0
  610. package/dist/esm/node_modules/node-forge/lib/x509.mjs +2168 -0
  611. package/dist/esm/node_modules/node-forge/lib/x509.mjs.map +1 -0
  612. package/dist/esm/node_modules/node-forge/lib.mjs +10 -0
  613. package/dist/esm/node_modules/node-forge/lib.mjs.map +1 -0
  614. package/dist/esm/node_modules/node-rsa/src/NodeRSA.mjs +338 -0
  615. package/dist/esm/node_modules/node-rsa/src/NodeRSA.mjs.map +1 -0
  616. package/dist/esm/node_modules/node-rsa/src/encryptEngines/encryptEngines.mjs +23 -0
  617. package/dist/esm/node_modules/node-rsa/src/encryptEngines/encryptEngines.mjs.map +1 -0
  618. package/dist/esm/node_modules/node-rsa/src/encryptEngines/io.mjs +62 -0
  619. package/dist/esm/node_modules/node-rsa/src/encryptEngines/io.mjs.map +1 -0
  620. package/dist/esm/node_modules/node-rsa/src/encryptEngines/js.mjs +41 -0
  621. package/dist/esm/node_modules/node-rsa/src/encryptEngines/js.mjs.map +1 -0
  622. package/dist/esm/node_modules/node-rsa/src/encryptEngines/node12.mjs +46 -0
  623. package/dist/esm/node_modules/node-rsa/src/encryptEngines/node12.mjs.map +1 -0
  624. package/dist/esm/node_modules/node-rsa/src/formats/components.mjs +52 -0
  625. package/dist/esm/node_modules/node-rsa/src/formats/components.mjs.map +1 -0
  626. package/dist/esm/node_modules/node-rsa/src/formats/formats.mjs +83 -0
  627. package/dist/esm/node_modules/node-rsa/src/formats/formats.mjs.map +1 -0
  628. package/dist/esm/node_modules/node-rsa/src/formats/openssh.mjs +174 -0
  629. package/dist/esm/node_modules/node-rsa/src/formats/openssh.mjs.map +1 -0
  630. package/dist/esm/node_modules/node-rsa/src/formats/pkcs1.mjs +101 -0
  631. package/dist/esm/node_modules/node-rsa/src/formats/pkcs1.mjs.map +1 -0
  632. package/dist/esm/node_modules/node-rsa/src/formats/pkcs8.mjs +128 -0
  633. package/dist/esm/node_modules/node-rsa/src/formats/pkcs8.mjs.map +1 -0
  634. package/dist/esm/node_modules/node-rsa/src/libs/jsbn.mjs +1344 -0
  635. package/dist/esm/node_modules/node-rsa/src/libs/jsbn.mjs.map +1 -0
  636. package/dist/esm/node_modules/node-rsa/src/libs/rsa.mjs +228 -0
  637. package/dist/esm/node_modules/node-rsa/src/libs/rsa.mjs.map +1 -0
  638. package/dist/esm/node_modules/node-rsa/src/schemes/oaep.mjs +120 -0
  639. package/dist/esm/node_modules/node-rsa/src/schemes/oaep.mjs.map +1 -0
  640. package/dist/esm/node_modules/node-rsa/src/schemes/pkcs1.mjs +172 -0
  641. package/dist/esm/node_modules/node-rsa/src/schemes/pkcs1.mjs.map +1 -0
  642. package/dist/esm/node_modules/node-rsa/src/schemes/pss.mjs +120 -0
  643. package/dist/esm/node_modules/node-rsa/src/schemes/pss.mjs.map +1 -0
  644. package/dist/esm/node_modules/node-rsa/src/schemes/schemes.mjs +25 -0
  645. package/dist/esm/node_modules/node-rsa/src/schemes/schemes.mjs.map +1 -0
  646. package/dist/esm/node_modules/node-rsa/src/utils.mjs +81 -0
  647. package/dist/esm/node_modules/node-rsa/src/utils.mjs.map +1 -0
  648. package/dist/esm/node_modules/pako/index.mjs +22 -0
  649. package/dist/esm/node_modules/pako/index.mjs.map +1 -0
  650. package/dist/esm/node_modules/pako/lib/deflate.mjs +308 -0
  651. package/dist/esm/node_modules/pako/lib/deflate.mjs.map +1 -0
  652. package/dist/esm/node_modules/pako/lib/inflate.mjs +314 -0
  653. package/dist/esm/node_modules/pako/lib/inflate.mjs.map +1 -0
  654. package/dist/esm/node_modules/pako/lib/utils/common.mjs +74 -0
  655. package/dist/esm/node_modules/pako/lib/utils/common.mjs.map +1 -0
  656. package/dist/esm/node_modules/pako/lib/utils/strings.mjs +128 -0
  657. package/dist/esm/node_modules/pako/lib/utils/strings.mjs.map +1 -0
  658. package/dist/esm/node_modules/pako/lib/zlib/adler32.mjs +26 -0
  659. package/dist/esm/node_modules/pako/lib/zlib/adler32.mjs.map +1 -0
  660. package/dist/esm/node_modules/pako/lib/zlib/constants.mjs +40 -0
  661. package/dist/esm/node_modules/pako/lib/zlib/constants.mjs.map +1 -0
  662. package/dist/esm/node_modules/pako/lib/zlib/crc32.mjs +28 -0
  663. package/dist/esm/node_modules/pako/lib/zlib/crc32.mjs.map +1 -0
  664. package/dist/esm/node_modules/pako/lib/zlib/deflate.mjs +886 -0
  665. package/dist/esm/node_modules/pako/lib/zlib/deflate.mjs.map +1 -0
  666. package/dist/esm/node_modules/pako/lib/zlib/gzheader.mjs +24 -0
  667. package/dist/esm/node_modules/pako/lib/zlib/gzheader.mjs.map +1 -0
  668. package/dist/esm/node_modules/pako/lib/zlib/inffast.mjs +224 -0
  669. package/dist/esm/node_modules/pako/lib/zlib/inffast.mjs.map +1 -0
  670. package/dist/esm/node_modules/pako/lib/zlib/inflate.mjs +1035 -0
  671. package/dist/esm/node_modules/pako/lib/zlib/inflate.mjs.map +1 -0
  672. package/dist/esm/node_modules/pako/lib/zlib/inftrees.mjs +275 -0
  673. package/dist/esm/node_modules/pako/lib/zlib/inftrees.mjs.map +1 -0
  674. package/dist/esm/node_modules/pako/lib/zlib/messages.mjs +22 -0
  675. package/dist/esm/node_modules/pako/lib/zlib/messages.mjs.map +1 -0
  676. package/dist/esm/node_modules/pako/lib/zlib/trees.mjs +623 -0
  677. package/dist/esm/node_modules/pako/lib/zlib/trees.mjs.map +1 -0
  678. package/dist/esm/node_modules/pako/lib/zlib/zstream.mjs +26 -0
  679. package/dist/esm/node_modules/pako/lib/zlib/zstream.mjs.map +1 -0
  680. package/dist/esm/node_modules/possible-typed-array-names/index.mjs +26 -0
  681. package/dist/esm/node_modules/possible-typed-array-names/index.mjs.map +1 -0
  682. package/dist/esm/node_modules/safe-regex-test/index.mjs +25 -0
  683. package/dist/esm/node_modules/safe-regex-test/index.mjs.map +1 -0
  684. package/dist/esm/node_modules/safer-buffer/safer.mjs +50 -0
  685. package/dist/esm/node_modules/safer-buffer/safer.mjs.map +1 -0
  686. package/dist/esm/node_modules/samlify/build/index.mjs +117 -0
  687. package/dist/esm/node_modules/samlify/build/index.mjs.map +1 -0
  688. package/dist/esm/node_modules/samlify/build/src/api.mjs +33 -0
  689. package/dist/esm/node_modules/samlify/build/src/api.mjs.map +1 -0
  690. package/dist/esm/node_modules/samlify/build/src/binding-post.mjs +504 -0
  691. package/dist/esm/node_modules/samlify/build/src/binding-post.mjs.map +1 -0
  692. package/dist/esm/node_modules/samlify/build/src/binding-redirect.mjs +339 -0
  693. package/dist/esm/node_modules/samlify/build/src/binding-redirect.mjs.map +1 -0
  694. package/dist/esm/node_modules/samlify/build/src/binding-simplesign.mjs +358 -0
  695. package/dist/esm/node_modules/samlify/build/src/binding-simplesign.mjs.map +1 -0
  696. package/dist/esm/node_modules/samlify/build/src/entity-idp.mjs +279 -0
  697. package/dist/esm/node_modules/samlify/build/src/entity-idp.mjs.map +1 -0
  698. package/dist/esm/node_modules/samlify/build/src/entity-sp.mjs +142 -0
  699. package/dist/esm/node_modules/samlify/build/src/entity-sp.mjs.map +1 -0
  700. package/dist/esm/node_modules/samlify/build/src/entity.mjs +253 -0
  701. package/dist/esm/node_modules/samlify/build/src/entity.mjs.map +1 -0
  702. package/dist/esm/node_modules/samlify/build/src/extractor.mjs +352 -0
  703. package/dist/esm/node_modules/samlify/build/src/extractor.mjs.map +1 -0
  704. package/dist/esm/node_modules/samlify/build/src/flow.mjs +389 -0
  705. package/dist/esm/node_modules/samlify/build/src/flow.mjs.map +1 -0
  706. package/dist/esm/node_modules/samlify/build/src/libsaml.mjs +544 -0
  707. package/dist/esm/node_modules/samlify/build/src/libsaml.mjs.map +1 -0
  708. package/dist/esm/node_modules/samlify/build/src/metadata-idp.mjs +171 -0
  709. package/dist/esm/node_modules/samlify/build/src/metadata-idp.mjs.map +1 -0
  710. package/dist/esm/node_modules/samlify/build/src/metadata-sp.mjs +214 -0
  711. package/dist/esm/node_modules/samlify/build/src/metadata-sp.mjs.map +1 -0
  712. package/dist/esm/node_modules/samlify/build/src/metadata.mjs +200 -0
  713. package/dist/esm/node_modules/samlify/build/src/metadata.mjs.map +1 -0
  714. package/dist/esm/node_modules/samlify/build/src/urn.mjs +225 -0
  715. package/dist/esm/node_modules/samlify/build/src/urn.mjs.map +1 -0
  716. package/dist/esm/node_modules/samlify/build/src/utility.mjs +277 -0
  717. package/dist/esm/node_modules/samlify/build/src/utility.mjs.map +1 -0
  718. package/dist/esm/node_modules/samlify/build/src/validator.mjs +53 -0
  719. package/dist/esm/node_modules/samlify/build/src/validator.mjs.map +1 -0
  720. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/index.mjs +39 -0
  721. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/index.mjs.map +1 -0
  722. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/md5.mjs +154 -0
  723. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/md5.mjs.map +1 -0
  724. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/nil.mjs +12 -0
  725. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/nil.mjs.map +1 -0
  726. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/parse.mjs +36 -0
  727. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/parse.mjs.map +1 -0
  728. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/regex.mjs +12 -0
  729. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/regex.mjs.map +1 -0
  730. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/rng.mjs +20 -0
  731. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/rng.mjs.map +1 -0
  732. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/sha1.mjs +101 -0
  733. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/sha1.mjs.map +1 -0
  734. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/stringify.mjs +22 -0
  735. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/stringify.mjs.map +1 -0
  736. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v1.mjs +63 -0
  737. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v1.mjs.map +1 -0
  738. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v3.mjs +17 -0
  739. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v3.mjs.map +1 -0
  740. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v35.mjs +48 -0
  741. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v35.mjs.map +1 -0
  742. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v4.mjs +28 -0
  743. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v4.mjs.map +1 -0
  744. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v5.mjs +17 -0
  745. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v5.mjs.map +1 -0
  746. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/validate.mjs +17 -0
  747. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/validate.mjs.map +1 -0
  748. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/version.mjs +18 -0
  749. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/version.mjs.map +1 -0
  750. package/dist/esm/node_modules/set-function-length/index.mjs +38 -0
  751. package/dist/esm/node_modules/set-function-length/index.mjs.map +1 -0
  752. package/dist/esm/node_modules/util/support/isBufferBrowser.mjs +14 -0
  753. package/dist/esm/node_modules/util/support/isBufferBrowser.mjs.map +1 -0
  754. package/dist/esm/node_modules/util/support/types.mjs +218 -0
  755. package/dist/esm/node_modules/util/support/types.mjs.map +1 -0
  756. package/dist/esm/node_modules/util/util.mjs +443 -0
  757. package/dist/esm/node_modules/util/util.mjs.map +1 -0
  758. package/dist/esm/node_modules/which-typed-array/index.mjs +93 -0
  759. package/dist/esm/node_modules/which-typed-array/index.mjs.map +1 -0
  760. package/dist/esm/node_modules/xml/lib/escapeForXML.mjs +24 -0
  761. package/dist/esm/node_modules/xml/lib/escapeForXML.mjs.map +1 -0
  762. package/dist/esm/node_modules/xml/lib/xml.mjs +183 -0
  763. package/dist/esm/node_modules/xml/lib/xml.mjs.map +1 -0
  764. package/dist/esm/node_modules/xml-crypto/lib/c14n-canonicalization.mjs +199 -0
  765. package/dist/esm/node_modules/xml-crypto/lib/c14n-canonicalization.mjs.map +1 -0
  766. package/dist/esm/node_modules/xml-crypto/lib/enveloped-signature.mjs +49 -0
  767. package/dist/esm/node_modules/xml-crypto/lib/enveloped-signature.mjs.map +1 -0
  768. package/dist/esm/node_modules/xml-crypto/lib/exclusive-canonicalization.mjs +220 -0
  769. package/dist/esm/node_modules/xml-crypto/lib/exclusive-canonicalization.mjs.map +1 -0
  770. package/dist/esm/node_modules/xml-crypto/lib/hash-algorithms.mjs +53 -0
  771. package/dist/esm/node_modules/xml-crypto/lib/hash-algorithms.mjs.map +1 -0
  772. package/dist/esm/node_modules/xml-crypto/lib/index.mjs +70 -0
  773. package/dist/esm/node_modules/xml-crypto/lib/index.mjs.map +1 -0
  774. package/dist/esm/node_modules/xml-crypto/lib/signature-algorithms.mjs +88 -0
  775. package/dist/esm/node_modules/xml-crypto/lib/signature-algorithms.mjs.map +1 -0
  776. package/dist/esm/node_modules/xml-crypto/lib/signed-xml.mjs +693 -0
  777. package/dist/esm/node_modules/xml-crypto/lib/signed-xml.mjs.map +1 -0
  778. package/dist/esm/node_modules/xml-crypto/lib/types.mjs +55 -0
  779. package/dist/esm/node_modules/xml-crypto/lib/types.mjs.map +1 -0
  780. package/dist/esm/node_modules/xml-crypto/lib/utils.mjs +210 -0
  781. package/dist/esm/node_modules/xml-crypto/lib/utils.mjs.map +1 -0
  782. package/dist/esm/node_modules/xml-crypto/node_modules/xpath/xpath.mjs +3442 -0
  783. package/dist/esm/node_modules/xml-crypto/node_modules/xpath/xpath.mjs.map +1 -0
  784. package/dist/esm/node_modules/xml-escape/index.mjs +27 -0
  785. package/dist/esm/node_modules/xml-escape/index.mjs.map +1 -0
  786. package/dist/esm/node_modules/xpath/xpath.mjs +3407 -0
  787. package/dist/esm/node_modules/xpath/xpath.mjs.map +1 -0
  788. package/dist/esm/node_modules/zod/v4/classic/errors.mjs +30 -0
  789. package/dist/esm/node_modules/zod/v4/classic/errors.mjs.map +1 -0
  790. package/dist/esm/node_modules/zod/v4/classic/iso.mjs +38 -0
  791. package/dist/esm/node_modules/zod/v4/classic/iso.mjs.map +1 -0
  792. package/dist/esm/node_modules/zod/v4/classic/parse.mjs +20 -0
  793. package/dist/esm/node_modules/zod/v4/classic/parse.mjs.map +1 -0
  794. package/dist/esm/node_modules/zod/v4/classic/schemas.mjs +519 -0
  795. package/dist/esm/node_modules/zod/v4/classic/schemas.mjs.map +1 -0
  796. package/dist/esm/node_modules/zod/v4/core/api.mjs +395 -0
  797. package/dist/esm/node_modules/zod/v4/core/api.mjs.map +1 -0
  798. package/dist/esm/node_modules/zod/v4/core/checks.mjs +226 -0
  799. package/dist/esm/node_modules/zod/v4/core/checks.mjs.map +1 -0
  800. package/dist/esm/node_modules/zod/v4/core/core.mjs +57 -0
  801. package/dist/esm/node_modules/zod/v4/core/core.mjs.map +1 -0
  802. package/dist/esm/node_modules/zod/v4/core/doc.mjs +34 -0
  803. package/dist/esm/node_modules/zod/v4/core/doc.mjs.map +1 -0
  804. package/dist/esm/node_modules/zod/v4/core/errors.mjs +63 -0
  805. package/dist/esm/node_modules/zod/v4/core/errors.mjs.map +1 -0
  806. package/dist/esm/node_modules/zod/v4/core/parse.mjs +110 -0
  807. package/dist/esm/node_modules/zod/v4/core/parse.mjs.map +1 -0
  808. package/dist/esm/node_modules/zod/v4/core/regexes.mjs +60 -0
  809. package/dist/esm/node_modules/zod/v4/core/regexes.mjs.map +1 -0
  810. package/dist/esm/node_modules/zod/v4/core/registries.mjs +53 -0
  811. package/dist/esm/node_modules/zod/v4/core/registries.mjs.map +1 -0
  812. package/dist/esm/node_modules/zod/v4/core/schemas.mjs +1069 -0
  813. package/dist/esm/node_modules/zod/v4/core/schemas.mjs.map +1 -0
  814. package/dist/esm/node_modules/zod/v4/core/util.mjs +302 -0
  815. package/dist/esm/node_modules/zod/v4/core/util.mjs.map +1 -0
  816. package/dist/esm/node_modules/zod/v4/core/versions.mjs +10 -0
  817. package/dist/esm/node_modules/zod/v4/core/versions.mjs.map +1 -0
  818. package/dist/esm/schemas/user.schema.mjs +17 -0
  819. package/dist/esm/schemas/user.schema.mjs.map +1 -1
  820. package/dist/esm/services/dictionary.service.mjs +8 -31
  821. package/dist/esm/services/dictionary.service.mjs.map +1 -1
  822. package/dist/esm/services/email.service.mjs +13 -0
  823. package/dist/esm/services/email.service.mjs.map +1 -1
  824. package/dist/esm/types/user.types.mjs.map +1 -1
  825. package/dist/esm/utils/auth/getAuth.mjs +61 -27
  826. package/dist/esm/utils/auth/getAuth.mjs.map +1 -1
  827. package/dist/esm/utils/mongoDB/connectDB.mjs.map +1 -1
  828. package/dist/types/MagicLinkEmail.d.ts +8 -0
  829. package/dist/types/MagicLinkEmail.d.ts.map +1 -0
  830. package/dist/types/controllers/dictionary.controller.d.ts +18 -5
  831. package/dist/types/controllers/dictionary.controller.d.ts.map +1 -1
  832. package/dist/types/controllers/projectAccessKey.controller.d.ts.map +1 -1
  833. package/dist/types/controllers/tag.controller.d.ts.map +1 -1
  834. package/dist/types/emails/InviteUserEmail.d.ts +4 -4
  835. package/dist/types/emails/InviteUserEmail.d.ts.map +1 -1
  836. package/dist/types/emails/MagicLinkEmail.d.ts +31 -0
  837. package/dist/types/emails/MagicLinkEmail.d.ts.map +1 -0
  838. package/dist/types/emails/OAuthTokenCreatedEmail.d.ts +4 -4
  839. package/dist/types/emails/ResetUserPassword.d.ts +4 -4
  840. package/dist/types/emails/ResetUserPassword.d.ts.map +1 -1
  841. package/dist/types/emails/SubscriptionPaymentCancellation.d.ts +4 -4
  842. package/dist/types/emails/SubscriptionPaymentCancellation.d.ts.map +1 -1
  843. package/dist/types/emails/SubscriptionPaymentError.d.ts +4 -4
  844. package/dist/types/emails/SubscriptionPaymentSuccess.d.ts +4 -4
  845. package/dist/types/emails/ValidateUserEmail.d.ts +4 -4
  846. package/dist/types/emails/Welcome.d.ts +4 -4
  847. package/dist/types/emails/Welcome.d.ts.map +1 -1
  848. package/dist/types/export.d.ts +1 -3
  849. package/dist/types/models/dictionary.model.d.ts +4 -4
  850. package/dist/types/models/discussion.model.d.ts +2 -2
  851. package/dist/types/models/oAuth2.model.d.ts +3 -3
  852. package/dist/types/schemas/dictionary.schema.d.ts +6 -6
  853. package/dist/types/schemas/discussion.schema.d.ts +6 -6
  854. package/dist/types/schemas/discussion.schema.d.ts.map +1 -1
  855. package/dist/types/schemas/oAuth2.schema.d.ts +5 -5
  856. package/dist/types/schemas/oAuth2.schema.d.ts.map +1 -1
  857. package/dist/types/schemas/organization.schema.d.ts +6 -6
  858. package/dist/types/schemas/plans.schema.d.ts +6 -6
  859. package/dist/types/schemas/project.schema.d.ts +6 -6
  860. package/dist/types/schemas/project.schema.d.ts.map +1 -1
  861. package/dist/types/schemas/session.schema.d.ts +6 -6
  862. package/dist/types/schemas/tag.schema.d.ts +6 -6
  863. package/dist/types/schemas/user.schema.d.ts +6 -6
  864. package/dist/types/schemas/user.schema.d.ts.map +1 -1
  865. package/dist/types/services/dictionary.service.d.ts +1 -12
  866. package/dist/types/services/dictionary.service.d.ts.map +1 -1
  867. package/dist/types/services/email.service.d.ts +21 -10
  868. package/dist/types/services/email.service.d.ts.map +1 -1
  869. package/dist/types/types/dictionary.types.d.ts +1 -0
  870. package/dist/types/types/dictionary.types.d.ts.map +1 -1
  871. package/dist/types/types/user.types.d.ts +1 -0
  872. package/dist/types/types/user.types.d.ts.map +1 -1
  873. package/dist/types/utils/auth/getAuth.d.ts.map +1 -1
  874. package/dist/types/utils/filtersAndPagination/getDictionaryFiltersAndPagination.d.ts +2 -2
  875. package/dist/types/utils/filtersAndPagination/getDiscussionFiltersAndPagination.d.ts +2 -2
  876. package/dist/types/utils/filtersAndPagination/getOrganizationFiltersAndPagination.d.ts +2 -2
  877. package/dist/types/utils/filtersAndPagination/getProjectFiltersAndPagination.d.ts +2 -2
  878. package/dist/types/utils/filtersAndPagination/getTagFiltersAndPagination.d.ts +2 -2
  879. package/dist/types/utils/mongoDB/connectDB.d.ts +2 -2
  880. package/dist/types/utils/mongoDB/connectDB.d.ts.map +1 -1
  881. package/package.json +38 -33
  882. package/dist/assets/controllers/test.json +0 -4
  883. package/dist/cjs/routes/audit.routes.cjs +0 -35
  884. package/dist/cjs/routes/audit.routes.cjs.map +0 -1
  885. package/dist/cjs/schemas/audit.schema.cjs +0 -65
  886. package/dist/cjs/schemas/audit.schema.cjs.map +0 -1
  887. package/dist/cjs/services/audit.service.cjs +0 -49
  888. package/dist/cjs/services/audit.service.cjs.map +0 -1
  889. package/dist/cjs/types/audit.types.cjs +0 -0
  890. package/dist/esm/routes/audit.routes.mjs +0 -31
  891. package/dist/esm/routes/audit.routes.mjs.map +0 -1
  892. package/dist/esm/schemas/audit.schema.mjs +0 -63
  893. package/dist/esm/schemas/audit.schema.mjs.map +0 -1
  894. package/dist/esm/services/audit.service.mjs +0 -46
  895. package/dist/esm/services/audit.service.mjs.map +0 -1
  896. package/dist/esm/types/audit.types.mjs +0 -0
  897. package/dist/types/emails/index.d.ts.map +0 -1
  898. package/dist/types/export.d.ts.map +0 -1
  899. package/dist/types/index.d.ts.map +0 -1
  900. package/dist/types/routes/audit.routes.d.ts +0 -29
  901. package/dist/types/routes/audit.routes.d.ts.map +0 -1
  902. package/dist/types/schemas/audit.schema.d.ts +0 -19
  903. package/dist/types/schemas/audit.schema.d.ts.map +0 -1
  904. package/dist/types/services/audit.service.d.ts +0 -36
  905. package/dist/types/services/audit.service.d.ts.map +0 -1
  906. package/dist/types/types/audit.types.d.ts +0 -29
  907. package/dist/types/types/audit.types.d.ts.map +0 -1
  908. package/dist/types/utils/access.d.ts.map +0 -1
  909. package/dist/types/utils/errors/index.d.ts.map +0 -1
@@ -0,0 +1,3407 @@
1
+ import { __commonJS } from "../../_virtual/rolldown_runtime.mjs";
2
+
3
+ //#region ../../node_modules/xpath/xpath.js
4
+ var require_xpath = /* @__PURE__ */ __commonJS({ "../../node_modules/xpath/xpath.js": ((exports) => {
5
+ (function(exports$1) {
6
+ function curry(func) {
7
+ var slice = Array.prototype.slice, totalargs = func.length, partial = function(args, fn$2) {
8
+ return function() {
9
+ return fn$2.apply(this, args.concat(slice.call(arguments)));
10
+ };
11
+ }, fn$1 = function() {
12
+ var args = slice.call(arguments);
13
+ return args.length < totalargs ? partial(args, fn$1) : func.apply(this, slice.apply(arguments, [0, totalargs]));
14
+ };
15
+ return fn$1;
16
+ }
17
+ var forEach = function(f, xs) {
18
+ for (var i = 0; i < xs.length; i += 1) f(xs[i], i, xs);
19
+ };
20
+ var reduce = function(f, seed, xs) {
21
+ var acc = seed;
22
+ forEach(function(x, i) {
23
+ acc = f(acc, x, i);
24
+ }, xs);
25
+ return acc;
26
+ };
27
+ var map = function(f, xs) {
28
+ var mapped = new Array(xs.length);
29
+ forEach(function(x, i) {
30
+ mapped[i] = f(x);
31
+ }, xs);
32
+ return mapped;
33
+ };
34
+ var filter = function(f, xs) {
35
+ var filtered = [];
36
+ forEach(function(x, i) {
37
+ if (f(x, i)) filtered.push(x);
38
+ }, xs);
39
+ return filtered;
40
+ };
41
+ var includes = function(values, value) {
42
+ for (var i = 0; i < values.length; i += 1) if (values[i] === value) return true;
43
+ return false;
44
+ };
45
+ function always(value) {
46
+ return function() {
47
+ return value;
48
+ };
49
+ }
50
+ function toString(x) {
51
+ return x.toString();
52
+ }
53
+ var join = function(s, xs) {
54
+ return xs.join(s);
55
+ };
56
+ var wrap = function(pref, suf, str) {
57
+ return pref + str + suf;
58
+ };
59
+ var prototypeConcat = Array.prototype.concat;
60
+ var MAX_ARGUMENT_LENGTH = 32767;
61
+ function flatten(arr) {
62
+ var result = [];
63
+ for (var start = 0; start < arr.length; start += MAX_ARGUMENT_LENGTH) {
64
+ var chunk = arr.slice(start, start + MAX_ARGUMENT_LENGTH);
65
+ result = prototypeConcat.apply(result, chunk);
66
+ }
67
+ return result;
68
+ }
69
+ function assign(target, varArgs) {
70
+ var to = Object(target);
71
+ for (var index = 1; index < arguments.length; index++) {
72
+ var nextSource = arguments[index];
73
+ if (nextSource != null) {
74
+ for (var nextKey in nextSource) if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) to[nextKey] = nextSource[nextKey];
75
+ }
76
+ }
77
+ return to;
78
+ }
79
+ XPathParser.prototype = /* @__PURE__ */ new Object();
80
+ XPathParser.prototype.constructor = XPathParser;
81
+ XPathParser.superclass = Object.prototype;
82
+ function XPathParser() {
83
+ this.init();
84
+ }
85
+ XPathParser.prototype.init = function() {
86
+ this.reduceActions = [];
87
+ this.reduceActions[3] = function(rhs) {
88
+ return new OrOperation(rhs[0], rhs[2]);
89
+ };
90
+ this.reduceActions[5] = function(rhs) {
91
+ return new AndOperation(rhs[0], rhs[2]);
92
+ };
93
+ this.reduceActions[7] = function(rhs) {
94
+ return new EqualsOperation(rhs[0], rhs[2]);
95
+ };
96
+ this.reduceActions[8] = function(rhs) {
97
+ return new NotEqualOperation(rhs[0], rhs[2]);
98
+ };
99
+ this.reduceActions[10] = function(rhs) {
100
+ return new LessThanOperation(rhs[0], rhs[2]);
101
+ };
102
+ this.reduceActions[11] = function(rhs) {
103
+ return new GreaterThanOperation(rhs[0], rhs[2]);
104
+ };
105
+ this.reduceActions[12] = function(rhs) {
106
+ return new LessThanOrEqualOperation(rhs[0], rhs[2]);
107
+ };
108
+ this.reduceActions[13] = function(rhs) {
109
+ return new GreaterThanOrEqualOperation(rhs[0], rhs[2]);
110
+ };
111
+ this.reduceActions[15] = function(rhs) {
112
+ return new PlusOperation(rhs[0], rhs[2]);
113
+ };
114
+ this.reduceActions[16] = function(rhs) {
115
+ return new MinusOperation(rhs[0], rhs[2]);
116
+ };
117
+ this.reduceActions[18] = function(rhs) {
118
+ return new MultiplyOperation(rhs[0], rhs[2]);
119
+ };
120
+ this.reduceActions[19] = function(rhs) {
121
+ return new DivOperation(rhs[0], rhs[2]);
122
+ };
123
+ this.reduceActions[20] = function(rhs) {
124
+ return new ModOperation(rhs[0], rhs[2]);
125
+ };
126
+ this.reduceActions[22] = function(rhs) {
127
+ return new UnaryMinusOperation(rhs[1]);
128
+ };
129
+ this.reduceActions[24] = function(rhs) {
130
+ return new BarOperation(rhs[0], rhs[2]);
131
+ };
132
+ this.reduceActions[25] = function(rhs) {
133
+ return new PathExpr(void 0, void 0, rhs[0]);
134
+ };
135
+ this.reduceActions[27] = function(rhs) {
136
+ rhs[0].locationPath = rhs[2];
137
+ return rhs[0];
138
+ };
139
+ this.reduceActions[28] = function(rhs) {
140
+ rhs[0].locationPath = rhs[2];
141
+ rhs[0].locationPath.steps.unshift(new Step(Step.DESCENDANTORSELF, NodeTest.nodeTest, []));
142
+ return rhs[0];
143
+ };
144
+ this.reduceActions[29] = function(rhs) {
145
+ return new PathExpr(rhs[0], [], void 0);
146
+ };
147
+ this.reduceActions[30] = function(rhs) {
148
+ if (Utilities.instance_of(rhs[0], PathExpr)) {
149
+ if (rhs[0].filterPredicates == void 0) rhs[0].filterPredicates = [];
150
+ rhs[0].filterPredicates.push(rhs[1]);
151
+ return rhs[0];
152
+ } else return new PathExpr(rhs[0], [rhs[1]], void 0);
153
+ };
154
+ this.reduceActions[32] = function(rhs) {
155
+ return rhs[1];
156
+ };
157
+ this.reduceActions[33] = function(rhs) {
158
+ return new XString(rhs[0]);
159
+ };
160
+ this.reduceActions[34] = function(rhs) {
161
+ return new XNumber(rhs[0]);
162
+ };
163
+ this.reduceActions[36] = function(rhs) {
164
+ return new FunctionCall(rhs[0], []);
165
+ };
166
+ this.reduceActions[37] = function(rhs) {
167
+ return new FunctionCall(rhs[0], rhs[2]);
168
+ };
169
+ this.reduceActions[38] = function(rhs) {
170
+ return [rhs[0]];
171
+ };
172
+ this.reduceActions[39] = function(rhs) {
173
+ rhs[2].unshift(rhs[0]);
174
+ return rhs[2];
175
+ };
176
+ this.reduceActions[43] = function(rhs) {
177
+ return new LocationPath(true, []);
178
+ };
179
+ this.reduceActions[44] = function(rhs) {
180
+ rhs[1].absolute = true;
181
+ return rhs[1];
182
+ };
183
+ this.reduceActions[46] = function(rhs) {
184
+ return new LocationPath(false, [rhs[0]]);
185
+ };
186
+ this.reduceActions[47] = function(rhs) {
187
+ rhs[0].steps.push(rhs[2]);
188
+ return rhs[0];
189
+ };
190
+ this.reduceActions[49] = function(rhs) {
191
+ return new Step(rhs[0], rhs[1], []);
192
+ };
193
+ this.reduceActions[50] = function(rhs) {
194
+ return new Step(Step.CHILD, rhs[0], []);
195
+ };
196
+ this.reduceActions[51] = function(rhs) {
197
+ return new Step(rhs[0], rhs[1], rhs[2]);
198
+ };
199
+ this.reduceActions[52] = function(rhs) {
200
+ return new Step(Step.CHILD, rhs[0], rhs[1]);
201
+ };
202
+ this.reduceActions[54] = function(rhs) {
203
+ return [rhs[0]];
204
+ };
205
+ this.reduceActions[55] = function(rhs) {
206
+ rhs[1].unshift(rhs[0]);
207
+ return rhs[1];
208
+ };
209
+ this.reduceActions[56] = function(rhs) {
210
+ if (rhs[0] == "ancestor") return Step.ANCESTOR;
211
+ else if (rhs[0] == "ancestor-or-self") return Step.ANCESTORORSELF;
212
+ else if (rhs[0] == "attribute") return Step.ATTRIBUTE;
213
+ else if (rhs[0] == "child") return Step.CHILD;
214
+ else if (rhs[0] == "descendant") return Step.DESCENDANT;
215
+ else if (rhs[0] == "descendant-or-self") return Step.DESCENDANTORSELF;
216
+ else if (rhs[0] == "following") return Step.FOLLOWING;
217
+ else if (rhs[0] == "following-sibling") return Step.FOLLOWINGSIBLING;
218
+ else if (rhs[0] == "namespace") return Step.NAMESPACE;
219
+ else if (rhs[0] == "parent") return Step.PARENT;
220
+ else if (rhs[0] == "preceding") return Step.PRECEDING;
221
+ else if (rhs[0] == "preceding-sibling") return Step.PRECEDINGSIBLING;
222
+ else if (rhs[0] == "self") return Step.SELF;
223
+ return -1;
224
+ };
225
+ this.reduceActions[57] = function(rhs) {
226
+ return Step.ATTRIBUTE;
227
+ };
228
+ this.reduceActions[59] = function(rhs) {
229
+ if (rhs[0] == "comment") return NodeTest.commentTest;
230
+ else if (rhs[0] == "text") return NodeTest.textTest;
231
+ else if (rhs[0] == "processing-instruction") return NodeTest.anyPiTest;
232
+ else if (rhs[0] == "node") return NodeTest.nodeTest;
233
+ return new NodeTest(-1, void 0);
234
+ };
235
+ this.reduceActions[60] = function(rhs) {
236
+ return new NodeTest.PITest(rhs[2]);
237
+ };
238
+ this.reduceActions[61] = function(rhs) {
239
+ return rhs[1];
240
+ };
241
+ this.reduceActions[63] = function(rhs) {
242
+ rhs[1].absolute = true;
243
+ rhs[1].steps.unshift(new Step(Step.DESCENDANTORSELF, NodeTest.nodeTest, []));
244
+ return rhs[1];
245
+ };
246
+ this.reduceActions[64] = function(rhs) {
247
+ rhs[0].steps.push(new Step(Step.DESCENDANTORSELF, NodeTest.nodeTest, []));
248
+ rhs[0].steps.push(rhs[2]);
249
+ return rhs[0];
250
+ };
251
+ this.reduceActions[65] = function(rhs) {
252
+ return new Step(Step.SELF, NodeTest.nodeTest, []);
253
+ };
254
+ this.reduceActions[66] = function(rhs) {
255
+ return new Step(Step.PARENT, NodeTest.nodeTest, []);
256
+ };
257
+ this.reduceActions[67] = function(rhs) {
258
+ return new VariableReference(rhs[1]);
259
+ };
260
+ this.reduceActions[68] = function(rhs) {
261
+ return NodeTest.nameTestAny;
262
+ };
263
+ this.reduceActions[69] = function(rhs) {
264
+ return new NodeTest.NameTestPrefixAny(rhs[0].split(":")[0]);
265
+ };
266
+ this.reduceActions[70] = function(rhs) {
267
+ return new NodeTest.NameTestQName(rhs[0]);
268
+ };
269
+ };
270
+ XPathParser.actionTable = [
271
+ " s s sssssssss s ss s ss",
272
+ " s ",
273
+ "r rrrrrrrrr rrrrrrr rr r ",
274
+ " rrrrr ",
275
+ " s s sssssssss s ss s ss",
276
+ "rs rrrrrrrr s sssssrrrrrr rrs rs ",
277
+ " s s sssssssss s ss s ss",
278
+ " s ",
279
+ " s ",
280
+ "r rrrrrrrrr rrrrrrr rr rr ",
281
+ "r rrrrrrrrr rrrrrrr rr rr ",
282
+ "r rrrrrrrrr rrrrrrr rr rr ",
283
+ "r rrrrrrrrr rrrrrrr rr rr ",
284
+ "r rrrrrrrrr rrrrrrr rr rr ",
285
+ " s ",
286
+ " s ",
287
+ " s s sssss s s ",
288
+ "r rrrrrrrrr rrrrrrr rr r ",
289
+ "a ",
290
+ "r s rr r ",
291
+ "r sr rr r ",
292
+ "r s rr s rr r ",
293
+ "r rssrr rss rr r ",
294
+ "r rrrrr rrrss rr r ",
295
+ "r rrrrrsss rrrrr rr r ",
296
+ "r rrrrrrrr rrrrr rr r ",
297
+ "r rrrrrrrr rrrrrs rr r ",
298
+ "r rrrrrrrr rrrrrr rr r ",
299
+ "r rrrrrrrr rrrrrr rr r ",
300
+ "r srrrrrrrr rrrrrrs rr sr ",
301
+ "r srrrrrrrr rrrrrrs rr r ",
302
+ "r rrrrrrrrr rrrrrrr rr rr ",
303
+ "r rrrrrrrrr rrrrrrr rr rr ",
304
+ "r rrrrrrrrr rrrrrrr rr rr ",
305
+ "r rrrrrrrr rrrrrr rr r ",
306
+ "r rrrrrrrr rrrrrr rr r ",
307
+ "r rrrrrrrrr rrrrrrr rr r ",
308
+ "r rrrrrrrrr rrrrrrr rr r ",
309
+ " sssss ",
310
+ "r rrrrrrrrr rrrrrrr rr sr ",
311
+ "r rrrrrrrrr rrrrrrr rr r ",
312
+ "r rrrrrrrrr rrrrrrr rr rr ",
313
+ "r rrrrrrrrr rrrrrrr rr rr ",
314
+ " s ",
315
+ "r srrrrrrrr rrrrrrs rr r ",
316
+ "r rrrrrrrr rrrrr rr r ",
317
+ " s ",
318
+ " s ",
319
+ " rrrrr ",
320
+ " s s sssssssss s sss s ss",
321
+ "r srrrrrrrr rrrrrrs rr r ",
322
+ " s s sssssssss s ss s ss",
323
+ " s s sssssssss s ss s ss",
324
+ " s s sssssssss s ss s ss",
325
+ " s s sssssssss s ss s ss",
326
+ " s s sssssssss s ss s ss",
327
+ " s s sssssssss s ss s ss",
328
+ " s s sssssssss s ss s ss",
329
+ " s s sssssssss s ss s ss",
330
+ " s s sssssssss s ss s ss",
331
+ " s s sssssssss s ss s ss",
332
+ " s s sssssssss s ss s ss",
333
+ " s s sssssssss s ss s ss",
334
+ " s s sssssssss s ss s ss",
335
+ " s s sssssssss ss s ss",
336
+ " s s sssssssss s ss s ss",
337
+ " s s sssss s s ",
338
+ " s s sssss s s ",
339
+ "r rrrrrrrrr rrrrrrr rr rr ",
340
+ " s s sssss s s ",
341
+ " s s sssss s s ",
342
+ "r rrrrrrrrr rrrrrrr rr sr ",
343
+ "r rrrrrrrrr rrrrrrr rr sr ",
344
+ "r rrrrrrrrr rrrrrrr rr r ",
345
+ "r rrrrrrrrr rrrrrrr rr rr ",
346
+ " s ",
347
+ "r rrrrrrrrr rrrrrrr rr rr ",
348
+ "r rrrrrrrrr rrrrrrr rr rr ",
349
+ " rr ",
350
+ " s ",
351
+ " rs ",
352
+ "r sr rr r ",
353
+ "r s rr s rr r ",
354
+ "r rssrr rss rr r ",
355
+ "r rssrr rss rr r ",
356
+ "r rrrrr rrrss rr r ",
357
+ "r rrrrr rrrss rr r ",
358
+ "r rrrrr rrrss rr r ",
359
+ "r rrrrr rrrss rr r ",
360
+ "r rrrrrsss rrrrr rr r ",
361
+ "r rrrrrsss rrrrr rr r ",
362
+ "r rrrrrrrr rrrrr rr r ",
363
+ "r rrrrrrrr rrrrr rr r ",
364
+ "r rrrrrrrr rrrrr rr r ",
365
+ "r rrrrrrrr rrrrrr rr r ",
366
+ " r ",
367
+ " s ",
368
+ "r srrrrrrrr rrrrrrs rr r ",
369
+ "r srrrrrrrr rrrrrrs rr r ",
370
+ "r rrrrrrrrr rrrrrrr rr r ",
371
+ "r rrrrrrrrr rrrrrrr rr r ",
372
+ "r rrrrrrrrr rrrrrrr rr r ",
373
+ "r rrrrrrrrr rrrrrrr rr r ",
374
+ "r rrrrrrrrr rrrrrrr rr rr ",
375
+ "r rrrrrrrrr rrrrrrr rr rr ",
376
+ " s s sssssssss s ss s ss",
377
+ "r rrrrrrrrr rrrrrrr rr rr ",
378
+ " r "
379
+ ];
380
+ XPathParser.actionTableNumber = [
381
+ " 1 0 /.-,+*)(' & %$ # \"!",
382
+ " J ",
383
+ "a aaaaaaaaa aaaaaaa aa a ",
384
+ " YYYYY ",
385
+ " 1 0 /.-,+*)(' & %$ # \"!",
386
+ "K1 KKKKKKKK . +*)('KKKKKK KK# K\" ",
387
+ " 1 0 /.-,+*)(' & %$ # \"!",
388
+ " N ",
389
+ " O ",
390
+ "e eeeeeeeee eeeeeee ee ee ",
391
+ "f fffffffff fffffff ff ff ",
392
+ "d ddddddddd ddddddd dd dd ",
393
+ "B BBBBBBBBB BBBBBBB BB BB ",
394
+ "A AAAAAAAAA AAAAAAA AA AA ",
395
+ " P ",
396
+ " Q ",
397
+ " 1 . +*)(' # \" ",
398
+ "b bbbbbbbbb bbbbbbb bb b ",
399
+ " ",
400
+ "! S !! ! ",
401
+ "\" T\" \"\" \" ",
402
+ "$ V $$ U $$ $ ",
403
+ "& &ZY&& &XW && & ",
404
+ ") ))))) )))\\[ )) ) ",
405
+ ". ....._^] ..... .. . ",
406
+ "1 11111111 11111 11 1 ",
407
+ "5 55555555 55555` 55 5 ",
408
+ "7 77777777 777777 77 7 ",
409
+ "9 99999999 999999 99 9 ",
410
+ ": c:::::::: ::::::b :: a: ",
411
+ "I fIIIIIIII IIIIIIe II I ",
412
+ "= ========= ======= == == ",
413
+ "? ????????? ??????? ?? ?? ",
414
+ "C CCCCCCCCC CCCCCCC CC CC ",
415
+ "J JJJJJJJJ JJJJJJ JJ J ",
416
+ "M MMMMMMMM MMMMMM MM M ",
417
+ "N NNNNNNNNN NNNNNNN NN N ",
418
+ "P PPPPPPPPP PPPPPPP PP P ",
419
+ " +*)(' ",
420
+ "R RRRRRRRRR RRRRRRR RR aR ",
421
+ "U UUUUUUUUU UUUUUUU UU U ",
422
+ "Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ",
423
+ "c ccccccccc ccccccc cc cc ",
424
+ " j ",
425
+ "L fLLLLLLLL LLLLLLe LL L ",
426
+ "6 66666666 66666 66 6 ",
427
+ " k ",
428
+ " l ",
429
+ " XXXXX ",
430
+ " 1 0 /.-,+*)(' & %$m # \"!",
431
+ "_ f________ ______e __ _ ",
432
+ " 1 0 /.-,+*)(' & %$ # \"!",
433
+ " 1 0 /.-,+*)(' & %$ # \"!",
434
+ " 1 0 /.-,+*)(' & %$ # \"!",
435
+ " 1 0 /.-,+*)(' & %$ # \"!",
436
+ " 1 0 /.-,+*)(' & %$ # \"!",
437
+ " 1 0 /.-,+*)(' & %$ # \"!",
438
+ " 1 0 /.-,+*)(' & %$ # \"!",
439
+ " 1 0 /.-,+*)(' & %$ # \"!",
440
+ " 1 0 /.-,+*)(' & %$ # \"!",
441
+ " 1 0 /.-,+*)(' & %$ # \"!",
442
+ " 1 0 /.-,+*)(' & %$ # \"!",
443
+ " 1 0 /.-,+*)(' & %$ # \"!",
444
+ " 1 0 /.-,+*)(' & %$ # \"!",
445
+ " 1 0 /.-,+*)(' %$ # \"!",
446
+ " 1 0 /.-,+*)(' & %$ # \"!",
447
+ " 1 . +*)(' # \" ",
448
+ " 1 . +*)(' # \" ",
449
+ "> >>>>>>>>> >>>>>>> >> >> ",
450
+ " 1 . +*)(' # \" ",
451
+ " 1 . +*)(' # \" ",
452
+ "Q QQQQQQQQQ QQQQQQQ QQ aQ ",
453
+ "V VVVVVVVVV VVVVVVV VV aV ",
454
+ "T TTTTTTTTT TTTTTTT TT T ",
455
+ "@ @@@@@@@@@ @@@@@@@ @@ @@ ",
456
+ " ‡ ",
457
+ "[ [[[[[[[[[ [[[[[[[ [[ [[ ",
458
+ "D DDDDDDDDD DDDDDDD DD DD ",
459
+ " HH ",
460
+ " ˆ ",
461
+ " F‰ ",
462
+ "# T# ## # ",
463
+ "% V %% U %% % ",
464
+ "' 'ZY'' 'XW '' ' ",
465
+ "( (ZY(( (XW (( ( ",
466
+ "+ +++++ +++\\[ ++ + ",
467
+ "* ***** ***\\[ ** * ",
468
+ "- ----- ---\\[ -- - ",
469
+ ", ,,,,, ,,,\\[ ,, , ",
470
+ "0 00000_^] 00000 00 0 ",
471
+ "/ /////_^] ///// // / ",
472
+ "2 22222222 22222 22 2 ",
473
+ "3 33333333 33333 33 3 ",
474
+ "4 44444444 44444 44 4 ",
475
+ "8 88888888 888888 88 8 ",
476
+ " ^ ",
477
+ " Š ",
478
+ "; f;;;;;;;; ;;;;;;e ;; ; ",
479
+ "< f<<<<<<<< <<<<<<e << < ",
480
+ "O OOOOOOOOO OOOOOOO OO O ",
481
+ "` ````````` ``````` `` ` ",
482
+ "S SSSSSSSSS SSSSSSS SS S ",
483
+ "W WWWWWWWWW WWWWWWW WW W ",
484
+ "\\ \\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\ \\\\ \\\\ ",
485
+ "E EEEEEEEEE EEEEEEE EE EE ",
486
+ " 1 0 /.-,+*)(' & %$ # \"!",
487
+ "] ]]]]]]]]] ]]]]]]] ]] ]] ",
488
+ " G "
489
+ ];
490
+ XPathParser.gotoTable = [
491
+ "3456789:;<=>?@ AB CDEFGH IJ ",
492
+ " ",
493
+ " ",
494
+ " ",
495
+ "L456789:;<=>?@ AB CDEFGH IJ ",
496
+ " M EFGH IJ ",
497
+ " N;<=>?@ AB CDEFGH IJ ",
498
+ " ",
499
+ " ",
500
+ " ",
501
+ " ",
502
+ " ",
503
+ " ",
504
+ " ",
505
+ " ",
506
+ " ",
507
+ " S EFGH IJ ",
508
+ " ",
509
+ " ",
510
+ " ",
511
+ " ",
512
+ " ",
513
+ " ",
514
+ " ",
515
+ " ",
516
+ " ",
517
+ " ",
518
+ " ",
519
+ " ",
520
+ " e ",
521
+ " ",
522
+ " ",
523
+ " ",
524
+ " ",
525
+ " ",
526
+ " ",
527
+ " ",
528
+ " ",
529
+ " h J ",
530
+ " i j ",
531
+ " ",
532
+ " ",
533
+ " ",
534
+ " ",
535
+ " ",
536
+ " ",
537
+ " ",
538
+ " ",
539
+ " ",
540
+ "o456789:;<=>?@ ABpqCDEFGH IJ ",
541
+ " ",
542
+ " r6789:;<=>?@ AB CDEFGH IJ ",
543
+ " s789:;<=>?@ AB CDEFGH IJ ",
544
+ " t89:;<=>?@ AB CDEFGH IJ ",
545
+ " u89:;<=>?@ AB CDEFGH IJ ",
546
+ " v9:;<=>?@ AB CDEFGH IJ ",
547
+ " w9:;<=>?@ AB CDEFGH IJ ",
548
+ " x9:;<=>?@ AB CDEFGH IJ ",
549
+ " y9:;<=>?@ AB CDEFGH IJ ",
550
+ " z:;<=>?@ AB CDEFGH IJ ",
551
+ " {:;<=>?@ AB CDEFGH IJ ",
552
+ " |;<=>?@ AB CDEFGH IJ ",
553
+ " };<=>?@ AB CDEFGH IJ ",
554
+ " ~;<=>?@ AB CDEFGH IJ ",
555
+ " =>?@ AB CDEFGH IJ ",
556
+ "€456789:;<=>?@ AB CDEFGH IJ",
557
+ " ‚ EFGH IJ ",
558
+ " ƒ EFGH IJ ",
559
+ " ",
560
+ " „ GH IJ ",
561
+ " … GH IJ ",
562
+ " i † ",
563
+ " i ‡ ",
564
+ " ",
565
+ " ",
566
+ " ",
567
+ " ",
568
+ " ",
569
+ " ",
570
+ " ",
571
+ " ",
572
+ " ",
573
+ " ",
574
+ " ",
575
+ " ",
576
+ " ",
577
+ " ",
578
+ " ",
579
+ " ",
580
+ " ",
581
+ " ",
582
+ " ",
583
+ " ",
584
+ " ",
585
+ " ",
586
+ " ",
587
+ " ",
588
+ " ",
589
+ " ",
590
+ " ",
591
+ " ",
592
+ " ",
593
+ " ",
594
+ " ",
595
+ " ",
596
+ "o456789:;<=>?@ ABŒqCDEFGH IJ ",
597
+ " ",
598
+ " "
599
+ ];
600
+ XPathParser.productions = [
601
+ [
602
+ 1,
603
+ 1,
604
+ 2
605
+ ],
606
+ [
607
+ 2,
608
+ 1,
609
+ 3
610
+ ],
611
+ [
612
+ 3,
613
+ 1,
614
+ 4
615
+ ],
616
+ [
617
+ 3,
618
+ 3,
619
+ 3,
620
+ -9,
621
+ 4
622
+ ],
623
+ [
624
+ 4,
625
+ 1,
626
+ 5
627
+ ],
628
+ [
629
+ 4,
630
+ 3,
631
+ 4,
632
+ -8,
633
+ 5
634
+ ],
635
+ [
636
+ 5,
637
+ 1,
638
+ 6
639
+ ],
640
+ [
641
+ 5,
642
+ 3,
643
+ 5,
644
+ -22,
645
+ 6
646
+ ],
647
+ [
648
+ 5,
649
+ 3,
650
+ 5,
651
+ -5,
652
+ 6
653
+ ],
654
+ [
655
+ 6,
656
+ 1,
657
+ 7
658
+ ],
659
+ [
660
+ 6,
661
+ 3,
662
+ 6,
663
+ -23,
664
+ 7
665
+ ],
666
+ [
667
+ 6,
668
+ 3,
669
+ 6,
670
+ -24,
671
+ 7
672
+ ],
673
+ [
674
+ 6,
675
+ 3,
676
+ 6,
677
+ -6,
678
+ 7
679
+ ],
680
+ [
681
+ 6,
682
+ 3,
683
+ 6,
684
+ -7,
685
+ 7
686
+ ],
687
+ [
688
+ 7,
689
+ 1,
690
+ 8
691
+ ],
692
+ [
693
+ 7,
694
+ 3,
695
+ 7,
696
+ -25,
697
+ 8
698
+ ],
699
+ [
700
+ 7,
701
+ 3,
702
+ 7,
703
+ -26,
704
+ 8
705
+ ],
706
+ [
707
+ 8,
708
+ 1,
709
+ 9
710
+ ],
711
+ [
712
+ 8,
713
+ 3,
714
+ 8,
715
+ -12,
716
+ 9
717
+ ],
718
+ [
719
+ 8,
720
+ 3,
721
+ 8,
722
+ -11,
723
+ 9
724
+ ],
725
+ [
726
+ 8,
727
+ 3,
728
+ 8,
729
+ -10,
730
+ 9
731
+ ],
732
+ [
733
+ 9,
734
+ 1,
735
+ 10
736
+ ],
737
+ [
738
+ 9,
739
+ 2,
740
+ -26,
741
+ 9
742
+ ],
743
+ [
744
+ 10,
745
+ 1,
746
+ 11
747
+ ],
748
+ [
749
+ 10,
750
+ 3,
751
+ 10,
752
+ -27,
753
+ 11
754
+ ],
755
+ [
756
+ 11,
757
+ 1,
758
+ 12
759
+ ],
760
+ [
761
+ 11,
762
+ 1,
763
+ 13
764
+ ],
765
+ [
766
+ 11,
767
+ 3,
768
+ 13,
769
+ -28,
770
+ 14
771
+ ],
772
+ [
773
+ 11,
774
+ 3,
775
+ 13,
776
+ -4,
777
+ 14
778
+ ],
779
+ [
780
+ 13,
781
+ 1,
782
+ 15
783
+ ],
784
+ [
785
+ 13,
786
+ 2,
787
+ 13,
788
+ 16
789
+ ],
790
+ [
791
+ 15,
792
+ 1,
793
+ 17
794
+ ],
795
+ [
796
+ 15,
797
+ 3,
798
+ -29,
799
+ 2,
800
+ -30
801
+ ],
802
+ [
803
+ 15,
804
+ 1,
805
+ -15
806
+ ],
807
+ [
808
+ 15,
809
+ 1,
810
+ -16
811
+ ],
812
+ [
813
+ 15,
814
+ 1,
815
+ 18
816
+ ],
817
+ [
818
+ 18,
819
+ 3,
820
+ -13,
821
+ -29,
822
+ -30
823
+ ],
824
+ [
825
+ 18,
826
+ 4,
827
+ -13,
828
+ -29,
829
+ 19,
830
+ -30
831
+ ],
832
+ [
833
+ 19,
834
+ 1,
835
+ 20
836
+ ],
837
+ [
838
+ 19,
839
+ 3,
840
+ 20,
841
+ -31,
842
+ 19
843
+ ],
844
+ [
845
+ 20,
846
+ 1,
847
+ 2
848
+ ],
849
+ [
850
+ 12,
851
+ 1,
852
+ 14
853
+ ],
854
+ [
855
+ 12,
856
+ 1,
857
+ 21
858
+ ],
859
+ [
860
+ 21,
861
+ 1,
862
+ -28
863
+ ],
864
+ [
865
+ 21,
866
+ 2,
867
+ -28,
868
+ 14
869
+ ],
870
+ [
871
+ 21,
872
+ 1,
873
+ 22
874
+ ],
875
+ [
876
+ 14,
877
+ 1,
878
+ 23
879
+ ],
880
+ [
881
+ 14,
882
+ 3,
883
+ 14,
884
+ -28,
885
+ 23
886
+ ],
887
+ [
888
+ 14,
889
+ 1,
890
+ 24
891
+ ],
892
+ [
893
+ 23,
894
+ 2,
895
+ 25,
896
+ 26
897
+ ],
898
+ [
899
+ 23,
900
+ 1,
901
+ 26
902
+ ],
903
+ [
904
+ 23,
905
+ 3,
906
+ 25,
907
+ 26,
908
+ 27
909
+ ],
910
+ [
911
+ 23,
912
+ 2,
913
+ 26,
914
+ 27
915
+ ],
916
+ [
917
+ 23,
918
+ 1,
919
+ 28
920
+ ],
921
+ [
922
+ 27,
923
+ 1,
924
+ 16
925
+ ],
926
+ [
927
+ 27,
928
+ 2,
929
+ 16,
930
+ 27
931
+ ],
932
+ [
933
+ 25,
934
+ 2,
935
+ -14,
936
+ -3
937
+ ],
938
+ [
939
+ 25,
940
+ 1,
941
+ -32
942
+ ],
943
+ [
944
+ 26,
945
+ 1,
946
+ 29
947
+ ],
948
+ [
949
+ 26,
950
+ 3,
951
+ -20,
952
+ -29,
953
+ -30
954
+ ],
955
+ [
956
+ 26,
957
+ 4,
958
+ -21,
959
+ -29,
960
+ -15,
961
+ -30
962
+ ],
963
+ [
964
+ 16,
965
+ 3,
966
+ -33,
967
+ 30,
968
+ -34
969
+ ],
970
+ [
971
+ 30,
972
+ 1,
973
+ 2
974
+ ],
975
+ [
976
+ 22,
977
+ 2,
978
+ -4,
979
+ 14
980
+ ],
981
+ [
982
+ 24,
983
+ 3,
984
+ 14,
985
+ -4,
986
+ 23
987
+ ],
988
+ [
989
+ 28,
990
+ 1,
991
+ -35
992
+ ],
993
+ [
994
+ 28,
995
+ 1,
996
+ -2
997
+ ],
998
+ [
999
+ 17,
1000
+ 2,
1001
+ -36,
1002
+ -18
1003
+ ],
1004
+ [
1005
+ 29,
1006
+ 1,
1007
+ -17
1008
+ ],
1009
+ [
1010
+ 29,
1011
+ 1,
1012
+ -19
1013
+ ],
1014
+ [
1015
+ 29,
1016
+ 1,
1017
+ -18
1018
+ ]
1019
+ ];
1020
+ XPathParser.DOUBLEDOT = 2;
1021
+ XPathParser.DOUBLECOLON = 3;
1022
+ XPathParser.DOUBLESLASH = 4;
1023
+ XPathParser.NOTEQUAL = 5;
1024
+ XPathParser.LESSTHANOREQUAL = 6;
1025
+ XPathParser.GREATERTHANOREQUAL = 7;
1026
+ XPathParser.AND = 8;
1027
+ XPathParser.OR = 9;
1028
+ XPathParser.MOD = 10;
1029
+ XPathParser.DIV = 11;
1030
+ XPathParser.MULTIPLYOPERATOR = 12;
1031
+ XPathParser.FUNCTIONNAME = 13;
1032
+ XPathParser.AXISNAME = 14;
1033
+ XPathParser.LITERAL = 15;
1034
+ XPathParser.NUMBER = 16;
1035
+ XPathParser.ASTERISKNAMETEST = 17;
1036
+ XPathParser.QNAME = 18;
1037
+ XPathParser.NCNAMECOLONASTERISK = 19;
1038
+ XPathParser.NODETYPE = 20;
1039
+ XPathParser.PROCESSINGINSTRUCTIONWITHLITERAL = 21;
1040
+ XPathParser.EQUALS = 22;
1041
+ XPathParser.LESSTHAN = 23;
1042
+ XPathParser.GREATERTHAN = 24;
1043
+ XPathParser.PLUS = 25;
1044
+ XPathParser.MINUS = 26;
1045
+ XPathParser.BAR = 27;
1046
+ XPathParser.SLASH = 28;
1047
+ XPathParser.LEFTPARENTHESIS = 29;
1048
+ XPathParser.RIGHTPARENTHESIS = 30;
1049
+ XPathParser.COMMA = 31;
1050
+ XPathParser.AT = 32;
1051
+ XPathParser.LEFTBRACKET = 33;
1052
+ XPathParser.RIGHTBRACKET = 34;
1053
+ XPathParser.DOT = 35;
1054
+ XPathParser.DOLLAR = 36;
1055
+ XPathParser.prototype.tokenize = function(s1) {
1056
+ var types = [];
1057
+ var values = [];
1058
+ var s = s1 + "\0";
1059
+ var pos = 0;
1060
+ var c = s.charAt(pos++);
1061
+ while (1) {
1062
+ while (c == " " || c == " " || c == "\r" || c == "\n") c = s.charAt(pos++);
1063
+ if (c == "\0" || pos >= s.length) break;
1064
+ if (c == "(") {
1065
+ types.push(XPathParser.LEFTPARENTHESIS);
1066
+ values.push(c);
1067
+ c = s.charAt(pos++);
1068
+ continue;
1069
+ }
1070
+ if (c == ")") {
1071
+ types.push(XPathParser.RIGHTPARENTHESIS);
1072
+ values.push(c);
1073
+ c = s.charAt(pos++);
1074
+ continue;
1075
+ }
1076
+ if (c == "[") {
1077
+ types.push(XPathParser.LEFTBRACKET);
1078
+ values.push(c);
1079
+ c = s.charAt(pos++);
1080
+ continue;
1081
+ }
1082
+ if (c == "]") {
1083
+ types.push(XPathParser.RIGHTBRACKET);
1084
+ values.push(c);
1085
+ c = s.charAt(pos++);
1086
+ continue;
1087
+ }
1088
+ if (c == "@") {
1089
+ types.push(XPathParser.AT);
1090
+ values.push(c);
1091
+ c = s.charAt(pos++);
1092
+ continue;
1093
+ }
1094
+ if (c == ",") {
1095
+ types.push(XPathParser.COMMA);
1096
+ values.push(c);
1097
+ c = s.charAt(pos++);
1098
+ continue;
1099
+ }
1100
+ if (c == "|") {
1101
+ types.push(XPathParser.BAR);
1102
+ values.push(c);
1103
+ c = s.charAt(pos++);
1104
+ continue;
1105
+ }
1106
+ if (c == "+") {
1107
+ types.push(XPathParser.PLUS);
1108
+ values.push(c);
1109
+ c = s.charAt(pos++);
1110
+ continue;
1111
+ }
1112
+ if (c == "-") {
1113
+ types.push(XPathParser.MINUS);
1114
+ values.push(c);
1115
+ c = s.charAt(pos++);
1116
+ continue;
1117
+ }
1118
+ if (c == "=") {
1119
+ types.push(XPathParser.EQUALS);
1120
+ values.push(c);
1121
+ c = s.charAt(pos++);
1122
+ continue;
1123
+ }
1124
+ if (c == "$") {
1125
+ types.push(XPathParser.DOLLAR);
1126
+ values.push(c);
1127
+ c = s.charAt(pos++);
1128
+ continue;
1129
+ }
1130
+ if (c == ".") {
1131
+ c = s.charAt(pos++);
1132
+ if (c == ".") {
1133
+ types.push(XPathParser.DOUBLEDOT);
1134
+ values.push("..");
1135
+ c = s.charAt(pos++);
1136
+ continue;
1137
+ }
1138
+ if (c >= "0" && c <= "9") {
1139
+ var number = "." + c;
1140
+ c = s.charAt(pos++);
1141
+ while (c >= "0" && c <= "9") {
1142
+ number += c;
1143
+ c = s.charAt(pos++);
1144
+ }
1145
+ types.push(XPathParser.NUMBER);
1146
+ values.push(number);
1147
+ continue;
1148
+ }
1149
+ types.push(XPathParser.DOT);
1150
+ values.push(".");
1151
+ continue;
1152
+ }
1153
+ if (c == "'" || c == "\"") {
1154
+ var delimiter = c;
1155
+ var literal = "";
1156
+ while (pos < s.length && (c = s.charAt(pos)) !== delimiter) {
1157
+ literal += c;
1158
+ pos += 1;
1159
+ }
1160
+ if (c !== delimiter) throw XPathException.fromMessage("Unterminated string literal: " + delimiter + literal);
1161
+ pos += 1;
1162
+ types.push(XPathParser.LITERAL);
1163
+ values.push(literal);
1164
+ c = s.charAt(pos++);
1165
+ continue;
1166
+ }
1167
+ if (c >= "0" && c <= "9") {
1168
+ var number = c;
1169
+ c = s.charAt(pos++);
1170
+ while (c >= "0" && c <= "9") {
1171
+ number += c;
1172
+ c = s.charAt(pos++);
1173
+ }
1174
+ if (c == ".") {
1175
+ if (s.charAt(pos) >= "0" && s.charAt(pos) <= "9") {
1176
+ number += c;
1177
+ number += s.charAt(pos++);
1178
+ c = s.charAt(pos++);
1179
+ while (c >= "0" && c <= "9") {
1180
+ number += c;
1181
+ c = s.charAt(pos++);
1182
+ }
1183
+ }
1184
+ }
1185
+ types.push(XPathParser.NUMBER);
1186
+ values.push(number);
1187
+ continue;
1188
+ }
1189
+ if (c == "*") {
1190
+ if (types.length > 0) {
1191
+ var last = types[types.length - 1];
1192
+ if (last != XPathParser.AT && last != XPathParser.DOUBLECOLON && last != XPathParser.LEFTPARENTHESIS && last != XPathParser.LEFTBRACKET && last != XPathParser.AND && last != XPathParser.OR && last != XPathParser.MOD && last != XPathParser.DIV && last != XPathParser.MULTIPLYOPERATOR && last != XPathParser.SLASH && last != XPathParser.DOUBLESLASH && last != XPathParser.BAR && last != XPathParser.PLUS && last != XPathParser.MINUS && last != XPathParser.EQUALS && last != XPathParser.NOTEQUAL && last != XPathParser.LESSTHAN && last != XPathParser.LESSTHANOREQUAL && last != XPathParser.GREATERTHAN && last != XPathParser.GREATERTHANOREQUAL) {
1193
+ types.push(XPathParser.MULTIPLYOPERATOR);
1194
+ values.push(c);
1195
+ c = s.charAt(pos++);
1196
+ continue;
1197
+ }
1198
+ }
1199
+ types.push(XPathParser.ASTERISKNAMETEST);
1200
+ values.push(c);
1201
+ c = s.charAt(pos++);
1202
+ continue;
1203
+ }
1204
+ if (c == ":") {
1205
+ if (s.charAt(pos) == ":") {
1206
+ types.push(XPathParser.DOUBLECOLON);
1207
+ values.push("::");
1208
+ pos++;
1209
+ c = s.charAt(pos++);
1210
+ continue;
1211
+ }
1212
+ }
1213
+ if (c == "/") {
1214
+ c = s.charAt(pos++);
1215
+ if (c == "/") {
1216
+ types.push(XPathParser.DOUBLESLASH);
1217
+ values.push("//");
1218
+ c = s.charAt(pos++);
1219
+ continue;
1220
+ }
1221
+ types.push(XPathParser.SLASH);
1222
+ values.push("/");
1223
+ continue;
1224
+ }
1225
+ if (c == "!") {
1226
+ if (s.charAt(pos) == "=") {
1227
+ types.push(XPathParser.NOTEQUAL);
1228
+ values.push("!=");
1229
+ pos++;
1230
+ c = s.charAt(pos++);
1231
+ continue;
1232
+ }
1233
+ }
1234
+ if (c == "<") {
1235
+ if (s.charAt(pos) == "=") {
1236
+ types.push(XPathParser.LESSTHANOREQUAL);
1237
+ values.push("<=");
1238
+ pos++;
1239
+ c = s.charAt(pos++);
1240
+ continue;
1241
+ }
1242
+ types.push(XPathParser.LESSTHAN);
1243
+ values.push("<");
1244
+ c = s.charAt(pos++);
1245
+ continue;
1246
+ }
1247
+ if (c == ">") {
1248
+ if (s.charAt(pos) == "=") {
1249
+ types.push(XPathParser.GREATERTHANOREQUAL);
1250
+ values.push(">=");
1251
+ pos++;
1252
+ c = s.charAt(pos++);
1253
+ continue;
1254
+ }
1255
+ types.push(XPathParser.GREATERTHAN);
1256
+ values.push(">");
1257
+ c = s.charAt(pos++);
1258
+ continue;
1259
+ }
1260
+ if (c == "_" || Utilities.isLetter(c.charCodeAt(0))) {
1261
+ var name$1 = c;
1262
+ c = s.charAt(pos++);
1263
+ while (Utilities.isNCNameChar(c.charCodeAt(0))) {
1264
+ name$1 += c;
1265
+ c = s.charAt(pos++);
1266
+ }
1267
+ if (types.length > 0) {
1268
+ var last = types[types.length - 1];
1269
+ if (last != XPathParser.AT && last != XPathParser.DOUBLECOLON && last != XPathParser.LEFTPARENTHESIS && last != XPathParser.LEFTBRACKET && last != XPathParser.AND && last != XPathParser.OR && last != XPathParser.MOD && last != XPathParser.DIV && last != XPathParser.MULTIPLYOPERATOR && last != XPathParser.SLASH && last != XPathParser.DOUBLESLASH && last != XPathParser.BAR && last != XPathParser.PLUS && last != XPathParser.MINUS && last != XPathParser.EQUALS && last != XPathParser.NOTEQUAL && last != XPathParser.LESSTHAN && last != XPathParser.LESSTHANOREQUAL && last != XPathParser.GREATERTHAN && last != XPathParser.GREATERTHANOREQUAL) {
1270
+ if (name$1 == "and") {
1271
+ types.push(XPathParser.AND);
1272
+ values.push(name$1);
1273
+ continue;
1274
+ }
1275
+ if (name$1 == "or") {
1276
+ types.push(XPathParser.OR);
1277
+ values.push(name$1);
1278
+ continue;
1279
+ }
1280
+ if (name$1 == "mod") {
1281
+ types.push(XPathParser.MOD);
1282
+ values.push(name$1);
1283
+ continue;
1284
+ }
1285
+ if (name$1 == "div") {
1286
+ types.push(XPathParser.DIV);
1287
+ values.push(name$1);
1288
+ continue;
1289
+ }
1290
+ }
1291
+ }
1292
+ if (c == ":") {
1293
+ if (s.charAt(pos) == "*") {
1294
+ types.push(XPathParser.NCNAMECOLONASTERISK);
1295
+ values.push(name$1 + ":*");
1296
+ pos++;
1297
+ c = s.charAt(pos++);
1298
+ continue;
1299
+ }
1300
+ if (s.charAt(pos) == "_" || Utilities.isLetter(s.charCodeAt(pos))) {
1301
+ name$1 += ":";
1302
+ c = s.charAt(pos++);
1303
+ while (Utilities.isNCNameChar(c.charCodeAt(0))) {
1304
+ name$1 += c;
1305
+ c = s.charAt(pos++);
1306
+ }
1307
+ if (c == "(") {
1308
+ types.push(XPathParser.FUNCTIONNAME);
1309
+ values.push(name$1);
1310
+ continue;
1311
+ }
1312
+ types.push(XPathParser.QNAME);
1313
+ values.push(name$1);
1314
+ continue;
1315
+ }
1316
+ if (s.charAt(pos) == ":") {
1317
+ types.push(XPathParser.AXISNAME);
1318
+ values.push(name$1);
1319
+ continue;
1320
+ }
1321
+ }
1322
+ if (c == "(") {
1323
+ if (name$1 == "comment" || name$1 == "text" || name$1 == "node") {
1324
+ types.push(XPathParser.NODETYPE);
1325
+ values.push(name$1);
1326
+ continue;
1327
+ }
1328
+ if (name$1 == "processing-instruction") {
1329
+ if (s.charAt(pos) == ")") types.push(XPathParser.NODETYPE);
1330
+ else types.push(XPathParser.PROCESSINGINSTRUCTIONWITHLITERAL);
1331
+ values.push(name$1);
1332
+ continue;
1333
+ }
1334
+ types.push(XPathParser.FUNCTIONNAME);
1335
+ values.push(name$1);
1336
+ continue;
1337
+ }
1338
+ types.push(XPathParser.QNAME);
1339
+ values.push(name$1);
1340
+ continue;
1341
+ }
1342
+ throw new Error("Unexpected character " + c);
1343
+ }
1344
+ types.push(1);
1345
+ values.push("[EOF]");
1346
+ return [types, values];
1347
+ };
1348
+ XPathParser.SHIFT = "s";
1349
+ XPathParser.REDUCE = "r";
1350
+ XPathParser.ACCEPT = "a";
1351
+ XPathParser.prototype.parse = function(s) {
1352
+ var types;
1353
+ var values;
1354
+ var res = this.tokenize(s);
1355
+ if (res == void 0) return;
1356
+ types = res[0];
1357
+ values = res[1];
1358
+ var tokenPos = 0;
1359
+ var state = [];
1360
+ var tokenType = [];
1361
+ var tokenValue = [];
1362
+ var s;
1363
+ var a;
1364
+ var t;
1365
+ state.push(0);
1366
+ tokenType.push(1);
1367
+ tokenValue.push("_S");
1368
+ a = types[tokenPos];
1369
+ t = values[tokenPos++];
1370
+ while (1) {
1371
+ s = state[state.length - 1];
1372
+ switch (XPathParser.actionTable[s].charAt(a - 1)) {
1373
+ case XPathParser.SHIFT:
1374
+ tokenType.push(-a);
1375
+ tokenValue.push(t);
1376
+ state.push(XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32);
1377
+ a = types[tokenPos];
1378
+ t = values[tokenPos++];
1379
+ break;
1380
+ case XPathParser.REDUCE:
1381
+ var num = XPathParser.productions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32][1];
1382
+ var rhs = [];
1383
+ for (var i = 0; i < num; i++) {
1384
+ tokenType.pop();
1385
+ rhs.unshift(tokenValue.pop());
1386
+ state.pop();
1387
+ }
1388
+ var s_ = state[state.length - 1];
1389
+ tokenType.push(XPathParser.productions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32][0]);
1390
+ if (this.reduceActions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32] == void 0) tokenValue.push(rhs[0]);
1391
+ else tokenValue.push(this.reduceActions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32](rhs));
1392
+ state.push(XPathParser.gotoTable[s_].charCodeAt(XPathParser.productions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32][0] - 2) - 33);
1393
+ break;
1394
+ case XPathParser.ACCEPT: return new XPath(tokenValue.pop());
1395
+ default: throw new Error("XPath parse error");
1396
+ }
1397
+ }
1398
+ };
1399
+ XPath.prototype = /* @__PURE__ */ new Object();
1400
+ XPath.prototype.constructor = XPath;
1401
+ XPath.superclass = Object.prototype;
1402
+ function XPath(e) {
1403
+ this.expression = e;
1404
+ }
1405
+ XPath.prototype.toString = function() {
1406
+ return this.expression.toString();
1407
+ };
1408
+ function setIfUnset(obj, prop, value) {
1409
+ if (!(prop in obj)) obj[prop] = value;
1410
+ }
1411
+ XPath.prototype.evaluate = function(c) {
1412
+ c.contextNode = c.expressionContextNode;
1413
+ c.contextSize = 1;
1414
+ c.contextPosition = 1;
1415
+ if (c.isHtml) {
1416
+ setIfUnset(c, "caseInsensitive", true);
1417
+ setIfUnset(c, "allowAnyNamespaceForNoPrefix", true);
1418
+ }
1419
+ setIfUnset(c, "caseInsensitive", false);
1420
+ return this.expression.evaluate(c);
1421
+ };
1422
+ XPath.XML_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace";
1423
+ XPath.XMLNS_NAMESPACE_URI = "http://www.w3.org/2000/xmlns/";
1424
+ Expression.prototype = /* @__PURE__ */ new Object();
1425
+ Expression.prototype.constructor = Expression;
1426
+ Expression.superclass = Object.prototype;
1427
+ function Expression() {}
1428
+ Expression.prototype.init = function() {};
1429
+ Expression.prototype.toString = function() {
1430
+ return "<Expression>";
1431
+ };
1432
+ Expression.prototype.evaluate = function(c) {
1433
+ throw new Error("Could not evaluate expression.");
1434
+ };
1435
+ UnaryOperation.prototype = new Expression();
1436
+ UnaryOperation.prototype.constructor = UnaryOperation;
1437
+ UnaryOperation.superclass = Expression.prototype;
1438
+ function UnaryOperation(rhs) {
1439
+ if (arguments.length > 0) this.init(rhs);
1440
+ }
1441
+ UnaryOperation.prototype.init = function(rhs) {
1442
+ this.rhs = rhs;
1443
+ };
1444
+ UnaryMinusOperation.prototype = new UnaryOperation();
1445
+ UnaryMinusOperation.prototype.constructor = UnaryMinusOperation;
1446
+ UnaryMinusOperation.superclass = UnaryOperation.prototype;
1447
+ function UnaryMinusOperation(rhs) {
1448
+ if (arguments.length > 0) this.init(rhs);
1449
+ }
1450
+ UnaryMinusOperation.prototype.init = function(rhs) {
1451
+ UnaryMinusOperation.superclass.init.call(this, rhs);
1452
+ };
1453
+ UnaryMinusOperation.prototype.evaluate = function(c) {
1454
+ return this.rhs.evaluate(c).number().negate();
1455
+ };
1456
+ UnaryMinusOperation.prototype.toString = function() {
1457
+ return "-" + this.rhs.toString();
1458
+ };
1459
+ BinaryOperation.prototype = new Expression();
1460
+ BinaryOperation.prototype.constructor = BinaryOperation;
1461
+ BinaryOperation.superclass = Expression.prototype;
1462
+ function BinaryOperation(lhs, rhs) {
1463
+ if (arguments.length > 0) this.init(lhs, rhs);
1464
+ }
1465
+ BinaryOperation.prototype.init = function(lhs, rhs) {
1466
+ this.lhs = lhs;
1467
+ this.rhs = rhs;
1468
+ };
1469
+ OrOperation.prototype = new BinaryOperation();
1470
+ OrOperation.prototype.constructor = OrOperation;
1471
+ OrOperation.superclass = BinaryOperation.prototype;
1472
+ function OrOperation(lhs, rhs) {
1473
+ if (arguments.length > 0) this.init(lhs, rhs);
1474
+ }
1475
+ OrOperation.prototype.init = function(lhs, rhs) {
1476
+ OrOperation.superclass.init.call(this, lhs, rhs);
1477
+ };
1478
+ OrOperation.prototype.toString = function() {
1479
+ return "(" + this.lhs.toString() + " or " + this.rhs.toString() + ")";
1480
+ };
1481
+ OrOperation.prototype.evaluate = function(c) {
1482
+ var b = this.lhs.evaluate(c).bool();
1483
+ if (b.booleanValue()) return b;
1484
+ return this.rhs.evaluate(c).bool();
1485
+ };
1486
+ AndOperation.prototype = new BinaryOperation();
1487
+ AndOperation.prototype.constructor = AndOperation;
1488
+ AndOperation.superclass = BinaryOperation.prototype;
1489
+ function AndOperation(lhs, rhs) {
1490
+ if (arguments.length > 0) this.init(lhs, rhs);
1491
+ }
1492
+ AndOperation.prototype.init = function(lhs, rhs) {
1493
+ AndOperation.superclass.init.call(this, lhs, rhs);
1494
+ };
1495
+ AndOperation.prototype.toString = function() {
1496
+ return "(" + this.lhs.toString() + " and " + this.rhs.toString() + ")";
1497
+ };
1498
+ AndOperation.prototype.evaluate = function(c) {
1499
+ var b = this.lhs.evaluate(c).bool();
1500
+ if (!b.booleanValue()) return b;
1501
+ return this.rhs.evaluate(c).bool();
1502
+ };
1503
+ EqualsOperation.prototype = new BinaryOperation();
1504
+ EqualsOperation.prototype.constructor = EqualsOperation;
1505
+ EqualsOperation.superclass = BinaryOperation.prototype;
1506
+ function EqualsOperation(lhs, rhs) {
1507
+ if (arguments.length > 0) this.init(lhs, rhs);
1508
+ }
1509
+ EqualsOperation.prototype.init = function(lhs, rhs) {
1510
+ EqualsOperation.superclass.init.call(this, lhs, rhs);
1511
+ };
1512
+ EqualsOperation.prototype.toString = function() {
1513
+ return "(" + this.lhs.toString() + " = " + this.rhs.toString() + ")";
1514
+ };
1515
+ EqualsOperation.prototype.evaluate = function(c) {
1516
+ return this.lhs.evaluate(c).equals(this.rhs.evaluate(c));
1517
+ };
1518
+ NotEqualOperation.prototype = new BinaryOperation();
1519
+ NotEqualOperation.prototype.constructor = NotEqualOperation;
1520
+ NotEqualOperation.superclass = BinaryOperation.prototype;
1521
+ function NotEqualOperation(lhs, rhs) {
1522
+ if (arguments.length > 0) this.init(lhs, rhs);
1523
+ }
1524
+ NotEqualOperation.prototype.init = function(lhs, rhs) {
1525
+ NotEqualOperation.superclass.init.call(this, lhs, rhs);
1526
+ };
1527
+ NotEqualOperation.prototype.toString = function() {
1528
+ return "(" + this.lhs.toString() + " != " + this.rhs.toString() + ")";
1529
+ };
1530
+ NotEqualOperation.prototype.evaluate = function(c) {
1531
+ return this.lhs.evaluate(c).notequal(this.rhs.evaluate(c));
1532
+ };
1533
+ LessThanOperation.prototype = new BinaryOperation();
1534
+ LessThanOperation.prototype.constructor = LessThanOperation;
1535
+ LessThanOperation.superclass = BinaryOperation.prototype;
1536
+ function LessThanOperation(lhs, rhs) {
1537
+ if (arguments.length > 0) this.init(lhs, rhs);
1538
+ }
1539
+ LessThanOperation.prototype.init = function(lhs, rhs) {
1540
+ LessThanOperation.superclass.init.call(this, lhs, rhs);
1541
+ };
1542
+ LessThanOperation.prototype.evaluate = function(c) {
1543
+ return this.lhs.evaluate(c).lessthan(this.rhs.evaluate(c));
1544
+ };
1545
+ LessThanOperation.prototype.toString = function() {
1546
+ return "(" + this.lhs.toString() + " < " + this.rhs.toString() + ")";
1547
+ };
1548
+ GreaterThanOperation.prototype = new BinaryOperation();
1549
+ GreaterThanOperation.prototype.constructor = GreaterThanOperation;
1550
+ GreaterThanOperation.superclass = BinaryOperation.prototype;
1551
+ function GreaterThanOperation(lhs, rhs) {
1552
+ if (arguments.length > 0) this.init(lhs, rhs);
1553
+ }
1554
+ GreaterThanOperation.prototype.init = function(lhs, rhs) {
1555
+ GreaterThanOperation.superclass.init.call(this, lhs, rhs);
1556
+ };
1557
+ GreaterThanOperation.prototype.evaluate = function(c) {
1558
+ return this.lhs.evaluate(c).greaterthan(this.rhs.evaluate(c));
1559
+ };
1560
+ GreaterThanOperation.prototype.toString = function() {
1561
+ return "(" + this.lhs.toString() + " > " + this.rhs.toString() + ")";
1562
+ };
1563
+ LessThanOrEqualOperation.prototype = new BinaryOperation();
1564
+ LessThanOrEqualOperation.prototype.constructor = LessThanOrEqualOperation;
1565
+ LessThanOrEqualOperation.superclass = BinaryOperation.prototype;
1566
+ function LessThanOrEqualOperation(lhs, rhs) {
1567
+ if (arguments.length > 0) this.init(lhs, rhs);
1568
+ }
1569
+ LessThanOrEqualOperation.prototype.init = function(lhs, rhs) {
1570
+ LessThanOrEqualOperation.superclass.init.call(this, lhs, rhs);
1571
+ };
1572
+ LessThanOrEqualOperation.prototype.evaluate = function(c) {
1573
+ return this.lhs.evaluate(c).lessthanorequal(this.rhs.evaluate(c));
1574
+ };
1575
+ LessThanOrEqualOperation.prototype.toString = function() {
1576
+ return "(" + this.lhs.toString() + " <= " + this.rhs.toString() + ")";
1577
+ };
1578
+ GreaterThanOrEqualOperation.prototype = new BinaryOperation();
1579
+ GreaterThanOrEqualOperation.prototype.constructor = GreaterThanOrEqualOperation;
1580
+ GreaterThanOrEqualOperation.superclass = BinaryOperation.prototype;
1581
+ function GreaterThanOrEqualOperation(lhs, rhs) {
1582
+ if (arguments.length > 0) this.init(lhs, rhs);
1583
+ }
1584
+ GreaterThanOrEqualOperation.prototype.init = function(lhs, rhs) {
1585
+ GreaterThanOrEqualOperation.superclass.init.call(this, lhs, rhs);
1586
+ };
1587
+ GreaterThanOrEqualOperation.prototype.evaluate = function(c) {
1588
+ return this.lhs.evaluate(c).greaterthanorequal(this.rhs.evaluate(c));
1589
+ };
1590
+ GreaterThanOrEqualOperation.prototype.toString = function() {
1591
+ return "(" + this.lhs.toString() + " >= " + this.rhs.toString() + ")";
1592
+ };
1593
+ PlusOperation.prototype = new BinaryOperation();
1594
+ PlusOperation.prototype.constructor = PlusOperation;
1595
+ PlusOperation.superclass = BinaryOperation.prototype;
1596
+ function PlusOperation(lhs, rhs) {
1597
+ if (arguments.length > 0) this.init(lhs, rhs);
1598
+ }
1599
+ PlusOperation.prototype.init = function(lhs, rhs) {
1600
+ PlusOperation.superclass.init.call(this, lhs, rhs);
1601
+ };
1602
+ PlusOperation.prototype.evaluate = function(c) {
1603
+ return this.lhs.evaluate(c).number().plus(this.rhs.evaluate(c).number());
1604
+ };
1605
+ PlusOperation.prototype.toString = function() {
1606
+ return "(" + this.lhs.toString() + " + " + this.rhs.toString() + ")";
1607
+ };
1608
+ MinusOperation.prototype = new BinaryOperation();
1609
+ MinusOperation.prototype.constructor = MinusOperation;
1610
+ MinusOperation.superclass = BinaryOperation.prototype;
1611
+ function MinusOperation(lhs, rhs) {
1612
+ if (arguments.length > 0) this.init(lhs, rhs);
1613
+ }
1614
+ MinusOperation.prototype.init = function(lhs, rhs) {
1615
+ MinusOperation.superclass.init.call(this, lhs, rhs);
1616
+ };
1617
+ MinusOperation.prototype.evaluate = function(c) {
1618
+ return this.lhs.evaluate(c).number().minus(this.rhs.evaluate(c).number());
1619
+ };
1620
+ MinusOperation.prototype.toString = function() {
1621
+ return "(" + this.lhs.toString() + " - " + this.rhs.toString() + ")";
1622
+ };
1623
+ MultiplyOperation.prototype = new BinaryOperation();
1624
+ MultiplyOperation.prototype.constructor = MultiplyOperation;
1625
+ MultiplyOperation.superclass = BinaryOperation.prototype;
1626
+ function MultiplyOperation(lhs, rhs) {
1627
+ if (arguments.length > 0) this.init(lhs, rhs);
1628
+ }
1629
+ MultiplyOperation.prototype.init = function(lhs, rhs) {
1630
+ MultiplyOperation.superclass.init.call(this, lhs, rhs);
1631
+ };
1632
+ MultiplyOperation.prototype.evaluate = function(c) {
1633
+ return this.lhs.evaluate(c).number().multiply(this.rhs.evaluate(c).number());
1634
+ };
1635
+ MultiplyOperation.prototype.toString = function() {
1636
+ return "(" + this.lhs.toString() + " * " + this.rhs.toString() + ")";
1637
+ };
1638
+ DivOperation.prototype = new BinaryOperation();
1639
+ DivOperation.prototype.constructor = DivOperation;
1640
+ DivOperation.superclass = BinaryOperation.prototype;
1641
+ function DivOperation(lhs, rhs) {
1642
+ if (arguments.length > 0) this.init(lhs, rhs);
1643
+ }
1644
+ DivOperation.prototype.init = function(lhs, rhs) {
1645
+ DivOperation.superclass.init.call(this, lhs, rhs);
1646
+ };
1647
+ DivOperation.prototype.evaluate = function(c) {
1648
+ return this.lhs.evaluate(c).number().div(this.rhs.evaluate(c).number());
1649
+ };
1650
+ DivOperation.prototype.toString = function() {
1651
+ return "(" + this.lhs.toString() + " div " + this.rhs.toString() + ")";
1652
+ };
1653
+ ModOperation.prototype = new BinaryOperation();
1654
+ ModOperation.prototype.constructor = ModOperation;
1655
+ ModOperation.superclass = BinaryOperation.prototype;
1656
+ function ModOperation(lhs, rhs) {
1657
+ if (arguments.length > 0) this.init(lhs, rhs);
1658
+ }
1659
+ ModOperation.prototype.init = function(lhs, rhs) {
1660
+ ModOperation.superclass.init.call(this, lhs, rhs);
1661
+ };
1662
+ ModOperation.prototype.evaluate = function(c) {
1663
+ return this.lhs.evaluate(c).number().mod(this.rhs.evaluate(c).number());
1664
+ };
1665
+ ModOperation.prototype.toString = function() {
1666
+ return "(" + this.lhs.toString() + " mod " + this.rhs.toString() + ")";
1667
+ };
1668
+ BarOperation.prototype = new BinaryOperation();
1669
+ BarOperation.prototype.constructor = BarOperation;
1670
+ BarOperation.superclass = BinaryOperation.prototype;
1671
+ function BarOperation(lhs, rhs) {
1672
+ if (arguments.length > 0) this.init(lhs, rhs);
1673
+ }
1674
+ BarOperation.prototype.init = function(lhs, rhs) {
1675
+ BarOperation.superclass.init.call(this, lhs, rhs);
1676
+ };
1677
+ BarOperation.prototype.evaluate = function(c) {
1678
+ return this.lhs.evaluate(c).nodeset().union(this.rhs.evaluate(c).nodeset());
1679
+ };
1680
+ BarOperation.prototype.toString = function() {
1681
+ return map(toString, [this.lhs, this.rhs]).join(" | ");
1682
+ };
1683
+ PathExpr.prototype = new Expression();
1684
+ PathExpr.prototype.constructor = PathExpr;
1685
+ PathExpr.superclass = Expression.prototype;
1686
+ function PathExpr(filter$1, filterPreds, locpath) {
1687
+ if (arguments.length > 0) this.init(filter$1, filterPreds, locpath);
1688
+ }
1689
+ PathExpr.prototype.init = function(filter$1, filterPreds, locpath) {
1690
+ PathExpr.superclass.init.call(this);
1691
+ this.filter = filter$1;
1692
+ this.filterPredicates = filterPreds;
1693
+ this.locationPath = locpath;
1694
+ };
1695
+ /**
1696
+ * Returns the topmost node of the tree containing node
1697
+ */
1698
+ function findRoot(node) {
1699
+ while (node && node.parentNode) node = node.parentNode;
1700
+ return node;
1701
+ }
1702
+ PathExpr.applyPredicates = function(predicates, c, nodes) {
1703
+ if (predicates.length === 0) return nodes;
1704
+ var ctx = c.extend({});
1705
+ return reduce(function(inNodes, pred) {
1706
+ ctx.contextSize = inNodes.length;
1707
+ return filter(function(node, i) {
1708
+ ctx.contextNode = node;
1709
+ ctx.contextPosition = i + 1;
1710
+ return PathExpr.predicateMatches(pred, ctx);
1711
+ }, inNodes);
1712
+ }, nodes, predicates);
1713
+ };
1714
+ PathExpr.getRoot = function(xpc, nodes) {
1715
+ var firstNode = nodes[0];
1716
+ if (firstNode.nodeType === 9) return firstNode;
1717
+ if (xpc.virtualRoot) return xpc.virtualRoot;
1718
+ var ownerDoc = firstNode.ownerDocument;
1719
+ if (ownerDoc) return ownerDoc;
1720
+ var n = firstNode;
1721
+ while (n.parentNode != null) n = n.parentNode;
1722
+ return n;
1723
+ };
1724
+ PathExpr.applyStep = function(step, xpc, node) {
1725
+ var newNodes = [];
1726
+ xpc.contextNode = node;
1727
+ switch (step.axis) {
1728
+ case Step.ANCESTOR:
1729
+ if (xpc.contextNode === xpc.virtualRoot) break;
1730
+ var m;
1731
+ if (xpc.contextNode.nodeType == 2) m = PathExpr.getOwnerElement(xpc.contextNode);
1732
+ else m = xpc.contextNode.parentNode;
1733
+ while (m != null) {
1734
+ if (step.nodeTest.matches(m, xpc)) newNodes.push(m);
1735
+ if (m === xpc.virtualRoot) break;
1736
+ m = m.parentNode;
1737
+ }
1738
+ break;
1739
+ case Step.ANCESTORORSELF:
1740
+ for (var m = xpc.contextNode; m != null; m = m.nodeType == 2 ? PathExpr.getOwnerElement(m) : m.parentNode) {
1741
+ if (step.nodeTest.matches(m, xpc)) newNodes.push(m);
1742
+ if (m === xpc.virtualRoot) break;
1743
+ }
1744
+ break;
1745
+ case Step.ATTRIBUTE:
1746
+ var nnm = xpc.contextNode.attributes;
1747
+ if (nnm != null) for (var k = 0; k < nnm.length; k++) {
1748
+ var m = nnm.item(k);
1749
+ if (step.nodeTest.matches(m, xpc)) newNodes.push(m);
1750
+ }
1751
+ break;
1752
+ case Step.CHILD:
1753
+ for (var m = xpc.contextNode.firstChild; m != null; m = m.nextSibling) if (step.nodeTest.matches(m, xpc)) newNodes.push(m);
1754
+ break;
1755
+ case Step.DESCENDANT:
1756
+ var st = [xpc.contextNode.firstChild];
1757
+ while (st.length > 0) for (var m = st.pop(); m != null;) {
1758
+ if (step.nodeTest.matches(m, xpc)) newNodes.push(m);
1759
+ if (m.firstChild != null) {
1760
+ st.push(m.nextSibling);
1761
+ m = m.firstChild;
1762
+ } else m = m.nextSibling;
1763
+ }
1764
+ break;
1765
+ case Step.DESCENDANTORSELF:
1766
+ if (step.nodeTest.matches(xpc.contextNode, xpc)) newNodes.push(xpc.contextNode);
1767
+ var st = [xpc.contextNode.firstChild];
1768
+ while (st.length > 0) for (var m = st.pop(); m != null;) {
1769
+ if (step.nodeTest.matches(m, xpc)) newNodes.push(m);
1770
+ if (m.firstChild != null) {
1771
+ st.push(m.nextSibling);
1772
+ m = m.firstChild;
1773
+ } else m = m.nextSibling;
1774
+ }
1775
+ break;
1776
+ case Step.FOLLOWING:
1777
+ if (xpc.contextNode === xpc.virtualRoot) break;
1778
+ var st = [];
1779
+ if (xpc.contextNode.firstChild != null) st.unshift(xpc.contextNode.firstChild);
1780
+ else st.unshift(xpc.contextNode.nextSibling);
1781
+ for (var m = xpc.contextNode.parentNode; m != null && m.nodeType != 9 && m !== xpc.virtualRoot; m = m.parentNode) st.unshift(m.nextSibling);
1782
+ do
1783
+ for (var m = st.pop(); m != null;) {
1784
+ if (step.nodeTest.matches(m, xpc)) newNodes.push(m);
1785
+ if (m.firstChild != null) {
1786
+ st.push(m.nextSibling);
1787
+ m = m.firstChild;
1788
+ } else m = m.nextSibling;
1789
+ }
1790
+ while (st.length > 0);
1791
+ break;
1792
+ case Step.FOLLOWINGSIBLING:
1793
+ if (xpc.contextNode === xpc.virtualRoot) break;
1794
+ for (var m = xpc.contextNode.nextSibling; m != null; m = m.nextSibling) if (step.nodeTest.matches(m, xpc)) newNodes.push(m);
1795
+ break;
1796
+ case Step.NAMESPACE:
1797
+ var n = {};
1798
+ if (xpc.contextNode.nodeType == 1) {
1799
+ n["xml"] = XPath.XML_NAMESPACE_URI;
1800
+ n["xmlns"] = XPath.XMLNS_NAMESPACE_URI;
1801
+ for (var m = xpc.contextNode; m != null && m.nodeType == 1; m = m.parentNode) for (var k = 0; k < m.attributes.length; k++) {
1802
+ var attr = m.attributes.item(k);
1803
+ var nm = String(attr.name);
1804
+ if (nm == "xmlns") {
1805
+ if (n[""] == void 0) n[""] = attr.value;
1806
+ } else if (nm.length > 6 && nm.substring(0, 6) == "xmlns:") {
1807
+ var pre = nm.substring(6, nm.length);
1808
+ if (n[pre] == void 0) n[pre] = attr.value;
1809
+ }
1810
+ }
1811
+ for (var pre in n) {
1812
+ var nsn = new XPathNamespace(pre, n[pre], xpc.contextNode);
1813
+ if (step.nodeTest.matches(nsn, xpc)) newNodes.push(nsn);
1814
+ }
1815
+ }
1816
+ break;
1817
+ case Step.PARENT:
1818
+ m = null;
1819
+ if (xpc.contextNode !== xpc.virtualRoot) if (xpc.contextNode.nodeType == 2) m = PathExpr.getOwnerElement(xpc.contextNode);
1820
+ else m = xpc.contextNode.parentNode;
1821
+ if (m != null && step.nodeTest.matches(m, xpc)) newNodes.push(m);
1822
+ break;
1823
+ case Step.PRECEDING:
1824
+ var st;
1825
+ if (xpc.virtualRoot != null) st = [xpc.virtualRoot];
1826
+ else st = [findRoot(xpc.contextNode)];
1827
+ outer: while (st.length > 0) for (var m = st.pop(); m != null;) {
1828
+ if (m == xpc.contextNode) break outer;
1829
+ if (step.nodeTest.matches(m, xpc)) newNodes.unshift(m);
1830
+ if (m.firstChild != null) {
1831
+ st.push(m.nextSibling);
1832
+ m = m.firstChild;
1833
+ } else m = m.nextSibling;
1834
+ }
1835
+ break;
1836
+ case Step.PRECEDINGSIBLING:
1837
+ if (xpc.contextNode === xpc.virtualRoot) break;
1838
+ for (var m = xpc.contextNode.previousSibling; m != null; m = m.previousSibling) if (step.nodeTest.matches(m, xpc)) newNodes.push(m);
1839
+ break;
1840
+ case Step.SELF:
1841
+ if (step.nodeTest.matches(xpc.contextNode, xpc)) newNodes.push(xpc.contextNode);
1842
+ break;
1843
+ default:
1844
+ }
1845
+ return newNodes;
1846
+ };
1847
+ function applyStepWithPredicates(step, xpc, node) {
1848
+ return PathExpr.applyPredicates(step.predicates, xpc, PathExpr.applyStep(step, xpc, node));
1849
+ }
1850
+ function applyStepToNodes(context, nodes, step) {
1851
+ return flatten(map(applyStepWithPredicates.bind(null, step, context), nodes));
1852
+ }
1853
+ PathExpr.applySteps = function(steps, xpc, nodes) {
1854
+ return reduce(applyStepToNodes.bind(null, xpc), nodes, steps);
1855
+ };
1856
+ PathExpr.prototype.applyFilter = function(c, xpc) {
1857
+ if (!this.filter) return { nodes: [c.contextNode] };
1858
+ var ns = this.filter.evaluate(c);
1859
+ if (!Utilities.instance_of(ns, XNodeSet)) {
1860
+ if (this.filterPredicates != null && this.filterPredicates.length > 0 || this.locationPath != null) throw new Error("Path expression filter must evaluate to a nodeset if predicates or location path are used");
1861
+ return { nonNodes: ns };
1862
+ }
1863
+ return { nodes: PathExpr.applyPredicates(this.filterPredicates || [], xpc, ns.toUnsortedArray()) };
1864
+ };
1865
+ PathExpr.applyLocationPath = function(locationPath, xpc, nodes) {
1866
+ if (!locationPath) return nodes;
1867
+ var startNodes = locationPath.absolute ? [PathExpr.getRoot(xpc, nodes)] : nodes;
1868
+ return PathExpr.applySteps(locationPath.steps, xpc, startNodes);
1869
+ };
1870
+ PathExpr.prototype.evaluate = function(c) {
1871
+ var xpc = assign(new XPathContext(), c);
1872
+ var filterResult = this.applyFilter(c, xpc);
1873
+ if ("nonNodes" in filterResult) return filterResult.nonNodes;
1874
+ var ns = new XNodeSet();
1875
+ ns.addArray(PathExpr.applyLocationPath(this.locationPath, xpc, filterResult.nodes));
1876
+ return ns;
1877
+ };
1878
+ PathExpr.predicateMatches = function(pred, c) {
1879
+ var res = pred.evaluate(c);
1880
+ return Utilities.instance_of(res, XNumber) ? c.contextPosition === res.numberValue() : res.booleanValue();
1881
+ };
1882
+ PathExpr.predicateString = function(predicate) {
1883
+ return wrap("[", "]", predicate.toString());
1884
+ };
1885
+ PathExpr.predicatesString = function(predicates) {
1886
+ return join("", map(PathExpr.predicateString, predicates));
1887
+ };
1888
+ PathExpr.prototype.toString = function() {
1889
+ if (this.filter != void 0) {
1890
+ var filterStr = toString(this.filter);
1891
+ if (Utilities.instance_of(this.filter, XString)) return wrap("'", "'", filterStr);
1892
+ if (this.filterPredicates != void 0 && this.filterPredicates.length) return wrap("(", ")", filterStr) + PathExpr.predicatesString(this.filterPredicates);
1893
+ if (this.locationPath != void 0) return filterStr + (this.locationPath.absolute ? "" : "/") + toString(this.locationPath);
1894
+ return filterStr;
1895
+ }
1896
+ return toString(this.locationPath);
1897
+ };
1898
+ PathExpr.getOwnerElement = function(n) {
1899
+ if (n.ownerElement) return n.ownerElement;
1900
+ try {
1901
+ if (n.selectSingleNode) return n.selectSingleNode("..");
1902
+ } catch (e) {}
1903
+ var elts = (n.nodeType == 9 ? n : n.ownerDocument).getElementsByTagName("*");
1904
+ for (var i = 0; i < elts.length; i++) {
1905
+ var elt = elts.item(i);
1906
+ var nnm = elt.attributes;
1907
+ for (var j = 0; j < nnm.length; j++) if (nnm.item(j) === n) return elt;
1908
+ }
1909
+ return null;
1910
+ };
1911
+ LocationPath.prototype = /* @__PURE__ */ new Object();
1912
+ LocationPath.prototype.constructor = LocationPath;
1913
+ LocationPath.superclass = Object.prototype;
1914
+ function LocationPath(abs, steps) {
1915
+ if (arguments.length > 0) this.init(abs, steps);
1916
+ }
1917
+ LocationPath.prototype.init = function(abs, steps) {
1918
+ this.absolute = abs;
1919
+ this.steps = steps;
1920
+ };
1921
+ LocationPath.prototype.toString = function() {
1922
+ return (this.absolute ? "/" : "") + map(toString, this.steps).join("/");
1923
+ };
1924
+ Step.prototype = /* @__PURE__ */ new Object();
1925
+ Step.prototype.constructor = Step;
1926
+ Step.superclass = Object.prototype;
1927
+ function Step(axis, nodetest, preds) {
1928
+ if (arguments.length > 0) this.init(axis, nodetest, preds);
1929
+ }
1930
+ Step.prototype.init = function(axis, nodetest, preds) {
1931
+ this.axis = axis;
1932
+ this.nodeTest = nodetest;
1933
+ this.predicates = preds;
1934
+ };
1935
+ Step.prototype.toString = function() {
1936
+ return Step.STEPNAMES[this.axis] + "::" + this.nodeTest.toString() + PathExpr.predicatesString(this.predicates);
1937
+ };
1938
+ Step.ANCESTOR = 0;
1939
+ Step.ANCESTORORSELF = 1;
1940
+ Step.ATTRIBUTE = 2;
1941
+ Step.CHILD = 3;
1942
+ Step.DESCENDANT = 4;
1943
+ Step.DESCENDANTORSELF = 5;
1944
+ Step.FOLLOWING = 6;
1945
+ Step.FOLLOWINGSIBLING = 7;
1946
+ Step.NAMESPACE = 8;
1947
+ Step.PARENT = 9;
1948
+ Step.PRECEDING = 10;
1949
+ Step.PRECEDINGSIBLING = 11;
1950
+ Step.SELF = 12;
1951
+ Step.STEPNAMES = reduce(function(acc, x) {
1952
+ return acc[x[0]] = x[1], acc;
1953
+ }, {}, [
1954
+ [Step.ANCESTOR, "ancestor"],
1955
+ [Step.ANCESTORORSELF, "ancestor-or-self"],
1956
+ [Step.ATTRIBUTE, "attribute"],
1957
+ [Step.CHILD, "child"],
1958
+ [Step.DESCENDANT, "descendant"],
1959
+ [Step.DESCENDANTORSELF, "descendant-or-self"],
1960
+ [Step.FOLLOWING, "following"],
1961
+ [Step.FOLLOWINGSIBLING, "following-sibling"],
1962
+ [Step.NAMESPACE, "namespace"],
1963
+ [Step.PARENT, "parent"],
1964
+ [Step.PRECEDING, "preceding"],
1965
+ [Step.PRECEDINGSIBLING, "preceding-sibling"],
1966
+ [Step.SELF, "self"]
1967
+ ]);
1968
+ NodeTest.prototype = /* @__PURE__ */ new Object();
1969
+ NodeTest.prototype.constructor = NodeTest;
1970
+ NodeTest.superclass = Object.prototype;
1971
+ function NodeTest(type, value) {
1972
+ if (arguments.length > 0) this.init(type, value);
1973
+ }
1974
+ NodeTest.prototype.init = function(type, value) {
1975
+ this.type = type;
1976
+ this.value = value;
1977
+ };
1978
+ NodeTest.prototype.toString = function() {
1979
+ return "<unknown nodetest type>";
1980
+ };
1981
+ NodeTest.prototype.matches = function(n, xpc) {
1982
+ console.warn("unknown node test type");
1983
+ };
1984
+ NodeTest.NAMETESTANY = 0;
1985
+ NodeTest.NAMETESTPREFIXANY = 1;
1986
+ NodeTest.NAMETESTQNAME = 2;
1987
+ NodeTest.COMMENT = 3;
1988
+ NodeTest.TEXT = 4;
1989
+ NodeTest.PI = 5;
1990
+ NodeTest.NODE = 6;
1991
+ NodeTest.isNodeType = function(types) {
1992
+ return function(node) {
1993
+ return includes(types, node.nodeType);
1994
+ };
1995
+ };
1996
+ NodeTest.makeNodeTestType = function(type, members, ctor) {
1997
+ var newType = ctor || function() {};
1998
+ newType.prototype = new NodeTest(type);
1999
+ newType.prototype.constructor = newType;
2000
+ assign(newType.prototype, members);
2001
+ return newType;
2002
+ };
2003
+ NodeTest.makeNodeTypeTest = function(type, nodeTypes, stringVal) {
2004
+ return new (NodeTest.makeNodeTestType(type, {
2005
+ matches: NodeTest.isNodeType(nodeTypes),
2006
+ toString: always(stringVal)
2007
+ }))();
2008
+ };
2009
+ NodeTest.hasPrefix = function(node) {
2010
+ return node.prefix || (node.nodeName || node.tagName).indexOf(":") !== -1;
2011
+ };
2012
+ NodeTest.isElementOrAttribute = NodeTest.isNodeType([1, 2]);
2013
+ NodeTest.nameSpaceMatches = function(prefix, xpc, n) {
2014
+ var nNamespace = n.namespaceURI || "";
2015
+ if (!prefix) return !nNamespace || xpc.allowAnyNamespaceForNoPrefix && !NodeTest.hasPrefix(n);
2016
+ var ns = xpc.namespaceResolver.getNamespace(prefix, xpc.expressionContextNode);
2017
+ if (ns == null) throw new Error("Cannot resolve QName " + prefix);
2018
+ return ns === nNamespace;
2019
+ };
2020
+ NodeTest.localNameMatches = function(localName, xpc, n) {
2021
+ var nLocalName = n.localName || n.nodeName;
2022
+ return xpc.caseInsensitive ? localName.toLowerCase() === nLocalName.toLowerCase() : localName === nLocalName;
2023
+ };
2024
+ NodeTest.NameTestPrefixAny = NodeTest.makeNodeTestType(NodeTest.NAMETESTPREFIXANY, {
2025
+ matches: function(n, xpc) {
2026
+ return NodeTest.isElementOrAttribute(n) && NodeTest.nameSpaceMatches(this.prefix, xpc, n);
2027
+ },
2028
+ toString: function() {
2029
+ return this.prefix + ":*";
2030
+ }
2031
+ }, function NameTestPrefixAny(prefix) {
2032
+ this.prefix = prefix;
2033
+ });
2034
+ NodeTest.NameTestQName = NodeTest.makeNodeTestType(NodeTest.NAMETESTQNAME, {
2035
+ matches: function(n, xpc) {
2036
+ return NodeTest.isNodeType([
2037
+ 1,
2038
+ 2,
2039
+ XPathNamespace.XPATH_NAMESPACE_NODE
2040
+ ])(n) && NodeTest.nameSpaceMatches(this.prefix, xpc, n) && NodeTest.localNameMatches(this.localName, xpc, n);
2041
+ },
2042
+ toString: function() {
2043
+ return this.name;
2044
+ }
2045
+ }, function NameTestQName(name$1) {
2046
+ var nameParts = name$1.split(":");
2047
+ this.name = name$1;
2048
+ this.prefix = nameParts.length > 1 ? nameParts[0] : null;
2049
+ this.localName = nameParts[nameParts.length > 1 ? 1 : 0];
2050
+ });
2051
+ NodeTest.PITest = NodeTest.makeNodeTestType(NodeTest.PI, {
2052
+ matches: function(n, xpc) {
2053
+ return NodeTest.isNodeType([7])(n) && (n.target || n.nodeName) === this.name;
2054
+ },
2055
+ toString: function() {
2056
+ return wrap("processing-instruction(\"", "\")", this.name);
2057
+ }
2058
+ }, function(name$1) {
2059
+ this.name = name$1;
2060
+ });
2061
+ NodeTest.nameTestAny = NodeTest.makeNodeTypeTest(NodeTest.NAMETESTANY, [
2062
+ 1,
2063
+ 2,
2064
+ XPathNamespace.XPATH_NAMESPACE_NODE
2065
+ ], "*");
2066
+ NodeTest.textTest = NodeTest.makeNodeTypeTest(NodeTest.TEXT, [3, 4], "text()");
2067
+ NodeTest.commentTest = NodeTest.makeNodeTypeTest(NodeTest.COMMENT, [8], "comment()");
2068
+ NodeTest.nodeTest = NodeTest.makeNodeTypeTest(NodeTest.NODE, [
2069
+ 1,
2070
+ 2,
2071
+ 3,
2072
+ 4,
2073
+ 7,
2074
+ 8,
2075
+ 9
2076
+ ], "node()");
2077
+ NodeTest.anyPiTest = NodeTest.makeNodeTypeTest(NodeTest.PI, [7], "processing-instruction()");
2078
+ VariableReference.prototype = new Expression();
2079
+ VariableReference.prototype.constructor = VariableReference;
2080
+ VariableReference.superclass = Expression.prototype;
2081
+ function VariableReference(v) {
2082
+ if (arguments.length > 0) this.init(v);
2083
+ }
2084
+ VariableReference.prototype.init = function(v) {
2085
+ this.variable = v;
2086
+ };
2087
+ VariableReference.prototype.toString = function() {
2088
+ return "$" + this.variable;
2089
+ };
2090
+ VariableReference.prototype.evaluate = function(c) {
2091
+ var parts = Utilities.resolveQName(this.variable, c.namespaceResolver, c.contextNode, false);
2092
+ if (parts[0] == null) throw new Error("Cannot resolve QName " + fn);
2093
+ var result = c.variableResolver.getVariable(parts[1], parts[0]);
2094
+ if (!result) throw XPathException.fromMessage("Undeclared variable: " + this.toString());
2095
+ return result;
2096
+ };
2097
+ FunctionCall.prototype = new Expression();
2098
+ FunctionCall.prototype.constructor = FunctionCall;
2099
+ FunctionCall.superclass = Expression.prototype;
2100
+ function FunctionCall(fn$1, args) {
2101
+ if (arguments.length > 0) this.init(fn$1, args);
2102
+ }
2103
+ FunctionCall.prototype.init = function(fn$1, args) {
2104
+ this.functionName = fn$1;
2105
+ this.arguments = args;
2106
+ };
2107
+ FunctionCall.prototype.toString = function() {
2108
+ var s = this.functionName + "(";
2109
+ for (var i = 0; i < this.arguments.length; i++) {
2110
+ if (i > 0) s += ", ";
2111
+ s += this.arguments[i].toString();
2112
+ }
2113
+ return s + ")";
2114
+ };
2115
+ FunctionCall.prototype.evaluate = function(c) {
2116
+ var f = FunctionResolver.getFunctionFromContext(this.functionName, c);
2117
+ if (!f) throw new Error("Unknown function " + this.functionName);
2118
+ var a = [c].concat(this.arguments);
2119
+ return f.apply(c.functionResolver.thisArg, a);
2120
+ };
2121
+ var Operators = /* @__PURE__ */ new Object();
2122
+ Operators.equals = function(l, r) {
2123
+ return l.equals(r);
2124
+ };
2125
+ Operators.notequal = function(l, r) {
2126
+ return l.notequal(r);
2127
+ };
2128
+ Operators.lessthan = function(l, r) {
2129
+ return l.lessthan(r);
2130
+ };
2131
+ Operators.greaterthan = function(l, r) {
2132
+ return l.greaterthan(r);
2133
+ };
2134
+ Operators.lessthanorequal = function(l, r) {
2135
+ return l.lessthanorequal(r);
2136
+ };
2137
+ Operators.greaterthanorequal = function(l, r) {
2138
+ return l.greaterthanorequal(r);
2139
+ };
2140
+ XString.prototype = new Expression();
2141
+ XString.prototype.constructor = XString;
2142
+ XString.superclass = Expression.prototype;
2143
+ function XString(s) {
2144
+ if (arguments.length > 0) this.init(s);
2145
+ }
2146
+ XString.prototype.init = function(s) {
2147
+ this.str = String(s);
2148
+ };
2149
+ XString.prototype.toString = function() {
2150
+ return this.str;
2151
+ };
2152
+ XString.prototype.evaluate = function(c) {
2153
+ return this;
2154
+ };
2155
+ XString.prototype.string = function() {
2156
+ return this;
2157
+ };
2158
+ XString.prototype.number = function() {
2159
+ return new XNumber(this.str);
2160
+ };
2161
+ XString.prototype.bool = function() {
2162
+ return new XBoolean(this.str);
2163
+ };
2164
+ XString.prototype.nodeset = function() {
2165
+ throw new Error("Cannot convert string to nodeset");
2166
+ };
2167
+ XString.prototype.stringValue = function() {
2168
+ return this.str;
2169
+ };
2170
+ XString.prototype.numberValue = function() {
2171
+ return this.number().numberValue();
2172
+ };
2173
+ XString.prototype.booleanValue = function() {
2174
+ return this.bool().booleanValue();
2175
+ };
2176
+ XString.prototype.equals = function(r) {
2177
+ if (Utilities.instance_of(r, XBoolean)) return this.bool().equals(r);
2178
+ if (Utilities.instance_of(r, XNumber)) return this.number().equals(r);
2179
+ if (Utilities.instance_of(r, XNodeSet)) return r.compareWithString(this, Operators.equals);
2180
+ return new XBoolean(this.str == r.str);
2181
+ };
2182
+ XString.prototype.notequal = function(r) {
2183
+ if (Utilities.instance_of(r, XBoolean)) return this.bool().notequal(r);
2184
+ if (Utilities.instance_of(r, XNumber)) return this.number().notequal(r);
2185
+ if (Utilities.instance_of(r, XNodeSet)) return r.compareWithString(this, Operators.notequal);
2186
+ return new XBoolean(this.str != r.str);
2187
+ };
2188
+ XString.prototype.lessthan = function(r) {
2189
+ return this.number().lessthan(r);
2190
+ };
2191
+ XString.prototype.greaterthan = function(r) {
2192
+ return this.number().greaterthan(r);
2193
+ };
2194
+ XString.prototype.lessthanorequal = function(r) {
2195
+ return this.number().lessthanorequal(r);
2196
+ };
2197
+ XString.prototype.greaterthanorequal = function(r) {
2198
+ return this.number().greaterthanorequal(r);
2199
+ };
2200
+ XNumber.prototype = new Expression();
2201
+ XNumber.prototype.constructor = XNumber;
2202
+ XNumber.superclass = Expression.prototype;
2203
+ function XNumber(n) {
2204
+ if (arguments.length > 0) this.init(n);
2205
+ }
2206
+ XNumber.prototype.init = function(n) {
2207
+ this.num = typeof n === "string" ? this.parse(n) : Number(n);
2208
+ };
2209
+ XNumber.prototype.numberFormat = /^\s*-?[0-9]*\.?[0-9]+\s*$/;
2210
+ XNumber.prototype.parse = function(s) {
2211
+ return this.numberFormat.test(s) ? parseFloat(s) : NaN;
2212
+ };
2213
+ function padSmallNumber(numberStr) {
2214
+ var parts = numberStr.split("e-");
2215
+ var base = parts[0].replace(".", "");
2216
+ var exponent = Number(parts[1]);
2217
+ for (var i = 0; i < exponent - 1; i += 1) base = "0" + base;
2218
+ return "0." + base;
2219
+ }
2220
+ function padLargeNumber(numberStr) {
2221
+ var parts = numberStr.split("e");
2222
+ var base = parts[0].replace(".", "");
2223
+ var zerosToAppend = Number(parts[1]) + 1 - base.length;
2224
+ for (var i = 0; i < zerosToAppend; i += 1) base += "0";
2225
+ return base;
2226
+ }
2227
+ XNumber.prototype.toString = function() {
2228
+ var strValue = this.num.toString();
2229
+ if (strValue.indexOf("e-") !== -1) return padSmallNumber(strValue);
2230
+ if (strValue.indexOf("e") !== -1) return padLargeNumber(strValue);
2231
+ return strValue;
2232
+ };
2233
+ XNumber.prototype.evaluate = function(c) {
2234
+ return this;
2235
+ };
2236
+ XNumber.prototype.string = function() {
2237
+ return new XString(this.toString());
2238
+ };
2239
+ XNumber.prototype.number = function() {
2240
+ return this;
2241
+ };
2242
+ XNumber.prototype.bool = function() {
2243
+ return new XBoolean(this.num);
2244
+ };
2245
+ XNumber.prototype.nodeset = function() {
2246
+ throw new Error("Cannot convert number to nodeset");
2247
+ };
2248
+ XNumber.prototype.stringValue = function() {
2249
+ return this.string().stringValue();
2250
+ };
2251
+ XNumber.prototype.numberValue = function() {
2252
+ return this.num;
2253
+ };
2254
+ XNumber.prototype.booleanValue = function() {
2255
+ return this.bool().booleanValue();
2256
+ };
2257
+ XNumber.prototype.negate = function() {
2258
+ return new XNumber(-this.num);
2259
+ };
2260
+ XNumber.prototype.equals = function(r) {
2261
+ if (Utilities.instance_of(r, XBoolean)) return this.bool().equals(r);
2262
+ if (Utilities.instance_of(r, XString)) return this.equals(r.number());
2263
+ if (Utilities.instance_of(r, XNodeSet)) return r.compareWithNumber(this, Operators.equals);
2264
+ return new XBoolean(this.num == r.num);
2265
+ };
2266
+ XNumber.prototype.notequal = function(r) {
2267
+ if (Utilities.instance_of(r, XBoolean)) return this.bool().notequal(r);
2268
+ if (Utilities.instance_of(r, XString)) return this.notequal(r.number());
2269
+ if (Utilities.instance_of(r, XNodeSet)) return r.compareWithNumber(this, Operators.notequal);
2270
+ return new XBoolean(this.num != r.num);
2271
+ };
2272
+ XNumber.prototype.lessthan = function(r) {
2273
+ if (Utilities.instance_of(r, XNodeSet)) return r.compareWithNumber(this, Operators.greaterthan);
2274
+ if (Utilities.instance_of(r, XBoolean) || Utilities.instance_of(r, XString)) return this.lessthan(r.number());
2275
+ return new XBoolean(this.num < r.num);
2276
+ };
2277
+ XNumber.prototype.greaterthan = function(r) {
2278
+ if (Utilities.instance_of(r, XNodeSet)) return r.compareWithNumber(this, Operators.lessthan);
2279
+ if (Utilities.instance_of(r, XBoolean) || Utilities.instance_of(r, XString)) return this.greaterthan(r.number());
2280
+ return new XBoolean(this.num > r.num);
2281
+ };
2282
+ XNumber.prototype.lessthanorequal = function(r) {
2283
+ if (Utilities.instance_of(r, XNodeSet)) return r.compareWithNumber(this, Operators.greaterthanorequal);
2284
+ if (Utilities.instance_of(r, XBoolean) || Utilities.instance_of(r, XString)) return this.lessthanorequal(r.number());
2285
+ return new XBoolean(this.num <= r.num);
2286
+ };
2287
+ XNumber.prototype.greaterthanorequal = function(r) {
2288
+ if (Utilities.instance_of(r, XNodeSet)) return r.compareWithNumber(this, Operators.lessthanorequal);
2289
+ if (Utilities.instance_of(r, XBoolean) || Utilities.instance_of(r, XString)) return this.greaterthanorequal(r.number());
2290
+ return new XBoolean(this.num >= r.num);
2291
+ };
2292
+ XNumber.prototype.plus = function(r) {
2293
+ return new XNumber(this.num + r.num);
2294
+ };
2295
+ XNumber.prototype.minus = function(r) {
2296
+ return new XNumber(this.num - r.num);
2297
+ };
2298
+ XNumber.prototype.multiply = function(r) {
2299
+ return new XNumber(this.num * r.num);
2300
+ };
2301
+ XNumber.prototype.div = function(r) {
2302
+ return new XNumber(this.num / r.num);
2303
+ };
2304
+ XNumber.prototype.mod = function(r) {
2305
+ return new XNumber(this.num % r.num);
2306
+ };
2307
+ XBoolean.prototype = new Expression();
2308
+ XBoolean.prototype.constructor = XBoolean;
2309
+ XBoolean.superclass = Expression.prototype;
2310
+ function XBoolean(b) {
2311
+ if (arguments.length > 0) this.init(b);
2312
+ }
2313
+ XBoolean.prototype.init = function(b) {
2314
+ this.b = Boolean(b);
2315
+ };
2316
+ XBoolean.prototype.toString = function() {
2317
+ return this.b.toString();
2318
+ };
2319
+ XBoolean.prototype.evaluate = function(c) {
2320
+ return this;
2321
+ };
2322
+ XBoolean.prototype.string = function() {
2323
+ return new XString(this.b);
2324
+ };
2325
+ XBoolean.prototype.number = function() {
2326
+ return new XNumber(this.b);
2327
+ };
2328
+ XBoolean.prototype.bool = function() {
2329
+ return this;
2330
+ };
2331
+ XBoolean.prototype.nodeset = function() {
2332
+ throw new Error("Cannot convert boolean to nodeset");
2333
+ };
2334
+ XBoolean.prototype.stringValue = function() {
2335
+ return this.string().stringValue();
2336
+ };
2337
+ XBoolean.prototype.numberValue = function() {
2338
+ return this.number().numberValue();
2339
+ };
2340
+ XBoolean.prototype.booleanValue = function() {
2341
+ return this.b;
2342
+ };
2343
+ XBoolean.prototype.not = function() {
2344
+ return new XBoolean(!this.b);
2345
+ };
2346
+ XBoolean.prototype.equals = function(r) {
2347
+ if (Utilities.instance_of(r, XString) || Utilities.instance_of(r, XNumber)) return this.equals(r.bool());
2348
+ if (Utilities.instance_of(r, XNodeSet)) return r.compareWithBoolean(this, Operators.equals);
2349
+ return new XBoolean(this.b == r.b);
2350
+ };
2351
+ XBoolean.prototype.notequal = function(r) {
2352
+ if (Utilities.instance_of(r, XString) || Utilities.instance_of(r, XNumber)) return this.notequal(r.bool());
2353
+ if (Utilities.instance_of(r, XNodeSet)) return r.compareWithBoolean(this, Operators.notequal);
2354
+ return new XBoolean(this.b != r.b);
2355
+ };
2356
+ XBoolean.prototype.lessthan = function(r) {
2357
+ return this.number().lessthan(r);
2358
+ };
2359
+ XBoolean.prototype.greaterthan = function(r) {
2360
+ return this.number().greaterthan(r);
2361
+ };
2362
+ XBoolean.prototype.lessthanorequal = function(r) {
2363
+ return this.number().lessthanorequal(r);
2364
+ };
2365
+ XBoolean.prototype.greaterthanorequal = function(r) {
2366
+ return this.number().greaterthanorequal(r);
2367
+ };
2368
+ XBoolean.true_ = new XBoolean(true);
2369
+ XBoolean.false_ = new XBoolean(false);
2370
+ AVLTree.prototype = /* @__PURE__ */ new Object();
2371
+ AVLTree.prototype.constructor = AVLTree;
2372
+ AVLTree.superclass = Object.prototype;
2373
+ function AVLTree(n) {
2374
+ this.init(n);
2375
+ }
2376
+ AVLTree.prototype.init = function(n) {
2377
+ this.left = null;
2378
+ this.right = null;
2379
+ this.node = n;
2380
+ this.depth = 1;
2381
+ };
2382
+ AVLTree.prototype.balance = function() {
2383
+ var ldepth = this.left == null ? 0 : this.left.depth;
2384
+ var rdepth = this.right == null ? 0 : this.right.depth;
2385
+ if (ldepth > rdepth + 1) {
2386
+ if ((this.left.left == null ? 0 : this.left.left.depth) < (this.left.right == null ? 0 : this.left.right.depth)) this.left.rotateRR();
2387
+ this.rotateLL();
2388
+ } else if (ldepth + 1 < rdepth) {
2389
+ var rrdepth = this.right.right == null ? 0 : this.right.right.depth;
2390
+ if ((this.right.left == null ? 0 : this.right.left.depth) > rrdepth) this.right.rotateLL();
2391
+ this.rotateRR();
2392
+ }
2393
+ };
2394
+ AVLTree.prototype.rotateLL = function() {
2395
+ var nodeBefore = this.node;
2396
+ var rightBefore = this.right;
2397
+ this.node = this.left.node;
2398
+ this.right = this.left;
2399
+ this.left = this.left.left;
2400
+ this.right.left = this.right.right;
2401
+ this.right.right = rightBefore;
2402
+ this.right.node = nodeBefore;
2403
+ this.right.updateInNewLocation();
2404
+ this.updateInNewLocation();
2405
+ };
2406
+ AVLTree.prototype.rotateRR = function() {
2407
+ var nodeBefore = this.node;
2408
+ var leftBefore = this.left;
2409
+ this.node = this.right.node;
2410
+ this.left = this.right;
2411
+ this.right = this.right.right;
2412
+ this.left.right = this.left.left;
2413
+ this.left.left = leftBefore;
2414
+ this.left.node = nodeBefore;
2415
+ this.left.updateInNewLocation();
2416
+ this.updateInNewLocation();
2417
+ };
2418
+ AVLTree.prototype.updateInNewLocation = function() {
2419
+ this.getDepthFromChildren();
2420
+ };
2421
+ AVLTree.prototype.getDepthFromChildren = function() {
2422
+ this.depth = this.node == null ? 0 : 1;
2423
+ if (this.left != null) this.depth = this.left.depth + 1;
2424
+ if (this.right != null && this.depth <= this.right.depth) this.depth = this.right.depth + 1;
2425
+ };
2426
+ function nodeOrder(n1, n2) {
2427
+ if (n1 === n2) return 0;
2428
+ if (n1.compareDocumentPosition) {
2429
+ var cpos = n1.compareDocumentPosition(n2);
2430
+ if (cpos & 1) return 1;
2431
+ if (cpos & 10) return 1;
2432
+ if (cpos & 20) return -1;
2433
+ return 0;
2434
+ }
2435
+ var d1 = 0, d2 = 0;
2436
+ for (var m1 = n1; m1 != null; m1 = m1.parentNode || m1.ownerElement) d1++;
2437
+ for (var m2 = n2; m2 != null; m2 = m2.parentNode || m2.ownerElement) d2++;
2438
+ if (d1 > d2) {
2439
+ while (d1 > d2) {
2440
+ n1 = n1.parentNode || n1.ownerElement;
2441
+ d1--;
2442
+ }
2443
+ if (n1 === n2) return 1;
2444
+ } else if (d2 > d1) {
2445
+ while (d2 > d1) {
2446
+ n2 = n2.parentNode || n2.ownerElement;
2447
+ d2--;
2448
+ }
2449
+ if (n1 === n2) return -1;
2450
+ }
2451
+ var n1Par = n1.parentNode || n1.ownerElement, n2Par = n2.parentNode || n2.ownerElement;
2452
+ while (n1Par !== n2Par) {
2453
+ n1 = n1Par;
2454
+ n2 = n2Par;
2455
+ n1Par = n1.parentNode || n1.ownerElement;
2456
+ n2Par = n2.parentNode || n2.ownerElement;
2457
+ }
2458
+ var n1isAttr = Utilities.isAttribute(n1);
2459
+ var n2isAttr = Utilities.isAttribute(n2);
2460
+ if (n1isAttr && !n2isAttr) return -1;
2461
+ if (!n1isAttr && n2isAttr) return 1;
2462
+ if (n1Par) {
2463
+ var cn = n1isAttr ? n1Par.attributes : n1Par.childNodes, len = cn.length;
2464
+ for (var i = 0; i < len; i += 1) {
2465
+ var n = cn[i];
2466
+ if (n === n1) return -1;
2467
+ if (n === n2) return 1;
2468
+ }
2469
+ }
2470
+ throw new Error("Unexpected: could not determine node order");
2471
+ }
2472
+ AVLTree.prototype.add = function(n) {
2473
+ if (n === this.node) return false;
2474
+ var o = nodeOrder(n, this.node);
2475
+ var ret = false;
2476
+ if (o == -1) if (this.left == null) {
2477
+ this.left = new AVLTree(n);
2478
+ ret = true;
2479
+ } else {
2480
+ ret = this.left.add(n);
2481
+ if (ret) this.balance();
2482
+ }
2483
+ else if (o == 1) if (this.right == null) {
2484
+ this.right = new AVLTree(n);
2485
+ ret = true;
2486
+ } else {
2487
+ ret = this.right.add(n);
2488
+ if (ret) this.balance();
2489
+ }
2490
+ if (ret) this.getDepthFromChildren();
2491
+ return ret;
2492
+ };
2493
+ XNodeSet.prototype = new Expression();
2494
+ XNodeSet.prototype.constructor = XNodeSet;
2495
+ XNodeSet.superclass = Expression.prototype;
2496
+ function XNodeSet() {
2497
+ this.init();
2498
+ }
2499
+ XNodeSet.prototype.init = function() {
2500
+ this.tree = null;
2501
+ this.nodes = [];
2502
+ this.size = 0;
2503
+ };
2504
+ XNodeSet.prototype.toString = function() {
2505
+ var p = this.first();
2506
+ if (p == null) return "";
2507
+ return this.stringForNode(p);
2508
+ };
2509
+ XNodeSet.prototype.evaluate = function(c) {
2510
+ return this;
2511
+ };
2512
+ XNodeSet.prototype.string = function() {
2513
+ return new XString(this.toString());
2514
+ };
2515
+ XNodeSet.prototype.stringValue = function() {
2516
+ return this.toString();
2517
+ };
2518
+ XNodeSet.prototype.number = function() {
2519
+ return new XNumber(this.string());
2520
+ };
2521
+ XNodeSet.prototype.numberValue = function() {
2522
+ return Number(this.string());
2523
+ };
2524
+ XNodeSet.prototype.bool = function() {
2525
+ return new XBoolean(this.booleanValue());
2526
+ };
2527
+ XNodeSet.prototype.booleanValue = function() {
2528
+ return !!this.size;
2529
+ };
2530
+ XNodeSet.prototype.nodeset = function() {
2531
+ return this;
2532
+ };
2533
+ XNodeSet.prototype.stringForNode = function(n) {
2534
+ if (n.nodeType == 9 || n.nodeType == 1 || n.nodeType === 11) return this.stringForContainerNode(n);
2535
+ if (n.nodeType === 2) return n.value || n.nodeValue;
2536
+ if (n.isNamespaceNode) return n.namespace;
2537
+ return n.nodeValue;
2538
+ };
2539
+ XNodeSet.prototype.stringForContainerNode = function(n) {
2540
+ var s = "";
2541
+ for (var n2 = n.firstChild; n2 != null; n2 = n2.nextSibling) {
2542
+ var nt = n2.nodeType;
2543
+ if (nt === 1 || nt === 3 || nt === 4 || nt === 9 || nt === 11) s += this.stringForNode(n2);
2544
+ }
2545
+ return s;
2546
+ };
2547
+ XNodeSet.prototype.buildTree = function() {
2548
+ if (!this.tree && this.nodes.length) {
2549
+ this.tree = new AVLTree(this.nodes[0]);
2550
+ for (var i = 1; i < this.nodes.length; i += 1) this.tree.add(this.nodes[i]);
2551
+ }
2552
+ return this.tree;
2553
+ };
2554
+ XNodeSet.prototype.first = function() {
2555
+ var p = this.buildTree();
2556
+ if (p == null) return null;
2557
+ while (p.left != null) p = p.left;
2558
+ return p.node;
2559
+ };
2560
+ XNodeSet.prototype.add = function(n) {
2561
+ for (var i = 0; i < this.nodes.length; i += 1) if (n === this.nodes[i]) return;
2562
+ this.tree = null;
2563
+ this.nodes.push(n);
2564
+ this.size += 1;
2565
+ };
2566
+ XNodeSet.prototype.addArray = function(ns) {
2567
+ var self = this;
2568
+ forEach(function(x) {
2569
+ self.add(x);
2570
+ }, ns);
2571
+ };
2572
+ /**
2573
+ * Returns an array of the node set's contents in document order
2574
+ */
2575
+ XNodeSet.prototype.toArray = function() {
2576
+ var a = [];
2577
+ this.toArrayRec(this.buildTree(), a);
2578
+ return a;
2579
+ };
2580
+ XNodeSet.prototype.toArrayRec = function(t, a) {
2581
+ if (t != null) {
2582
+ this.toArrayRec(t.left, a);
2583
+ a.push(t.node);
2584
+ this.toArrayRec(t.right, a);
2585
+ }
2586
+ };
2587
+ /**
2588
+ * Returns an array of the node set's contents in arbitrary order
2589
+ */
2590
+ XNodeSet.prototype.toUnsortedArray = function() {
2591
+ return this.nodes.slice();
2592
+ };
2593
+ XNodeSet.prototype.compareWithString = function(r, o) {
2594
+ var a = this.toUnsortedArray();
2595
+ for (var i = 0; i < a.length; i++) {
2596
+ var n = a[i];
2597
+ var res = o(new XString(this.stringForNode(n)), r);
2598
+ if (res.booleanValue()) return res;
2599
+ }
2600
+ return new XBoolean(false);
2601
+ };
2602
+ XNodeSet.prototype.compareWithNumber = function(r, o) {
2603
+ var a = this.toUnsortedArray();
2604
+ for (var i = 0; i < a.length; i++) {
2605
+ var n = a[i];
2606
+ var res = o(new XNumber(this.stringForNode(n)), r);
2607
+ if (res.booleanValue()) return res;
2608
+ }
2609
+ return new XBoolean(false);
2610
+ };
2611
+ XNodeSet.prototype.compareWithBoolean = function(r, o) {
2612
+ return o(this.bool(), r);
2613
+ };
2614
+ XNodeSet.prototype.compareWithNodeSet = function(r, o) {
2615
+ var arr = this.toUnsortedArray();
2616
+ var oInvert = function(lop, rop) {
2617
+ return o(rop, lop);
2618
+ };
2619
+ for (var i = 0; i < arr.length; i++) {
2620
+ var l = new XString(this.stringForNode(arr[i]));
2621
+ var res = r.compareWithString(l, oInvert);
2622
+ if (res.booleanValue()) return res;
2623
+ }
2624
+ return new XBoolean(false);
2625
+ };
2626
+ XNodeSet.compareWith = curry(function(o, r) {
2627
+ if (Utilities.instance_of(r, XString)) return this.compareWithString(r, o);
2628
+ if (Utilities.instance_of(r, XNumber)) return this.compareWithNumber(r, o);
2629
+ if (Utilities.instance_of(r, XBoolean)) return this.compareWithBoolean(r, o);
2630
+ return this.compareWithNodeSet(r, o);
2631
+ });
2632
+ XNodeSet.prototype.equals = XNodeSet.compareWith(Operators.equals);
2633
+ XNodeSet.prototype.notequal = XNodeSet.compareWith(Operators.notequal);
2634
+ XNodeSet.prototype.lessthan = XNodeSet.compareWith(Operators.lessthan);
2635
+ XNodeSet.prototype.greaterthan = XNodeSet.compareWith(Operators.greaterthan);
2636
+ XNodeSet.prototype.lessthanorequal = XNodeSet.compareWith(Operators.lessthanorequal);
2637
+ XNodeSet.prototype.greaterthanorequal = XNodeSet.compareWith(Operators.greaterthanorequal);
2638
+ XNodeSet.prototype.union = function(r) {
2639
+ var ns = new XNodeSet();
2640
+ ns.addArray(this.toUnsortedArray());
2641
+ ns.addArray(r.toUnsortedArray());
2642
+ return ns;
2643
+ };
2644
+ XPathNamespace.prototype = /* @__PURE__ */ new Object();
2645
+ XPathNamespace.prototype.constructor = XPathNamespace;
2646
+ XPathNamespace.superclass = Object.prototype;
2647
+ function XPathNamespace(pre, ns, p) {
2648
+ this.isXPathNamespace = true;
2649
+ this.ownerDocument = p.ownerDocument;
2650
+ this.nodeName = "#namespace";
2651
+ this.prefix = pre;
2652
+ this.localName = pre;
2653
+ this.namespaceURI = ns;
2654
+ this.nodeValue = ns;
2655
+ this.ownerElement = p;
2656
+ this.nodeType = XPathNamespace.XPATH_NAMESPACE_NODE;
2657
+ }
2658
+ XPathNamespace.prototype.toString = function() {
2659
+ return "{ \"" + this.prefix + "\", \"" + this.namespaceURI + "\" }";
2660
+ };
2661
+ XPathContext.prototype = /* @__PURE__ */ new Object();
2662
+ XPathContext.prototype.constructor = XPathContext;
2663
+ XPathContext.superclass = Object.prototype;
2664
+ function XPathContext(vr, nr, fr) {
2665
+ this.variableResolver = vr != null ? vr : new VariableResolver();
2666
+ this.namespaceResolver = nr != null ? nr : new NamespaceResolver();
2667
+ this.functionResolver = fr != null ? fr : new FunctionResolver();
2668
+ }
2669
+ XPathContext.prototype.extend = function(newProps) {
2670
+ return assign(new XPathContext(), this, newProps);
2671
+ };
2672
+ VariableResolver.prototype = /* @__PURE__ */ new Object();
2673
+ VariableResolver.prototype.constructor = VariableResolver;
2674
+ VariableResolver.superclass = Object.prototype;
2675
+ function VariableResolver() {}
2676
+ VariableResolver.prototype.getVariable = function(ln, ns) {
2677
+ return null;
2678
+ };
2679
+ FunctionResolver.prototype = /* @__PURE__ */ new Object();
2680
+ FunctionResolver.prototype.constructor = FunctionResolver;
2681
+ FunctionResolver.superclass = Object.prototype;
2682
+ function FunctionResolver(thisArg) {
2683
+ this.thisArg = thisArg != null ? thisArg : Functions;
2684
+ this.functions = /* @__PURE__ */ new Object();
2685
+ this.addStandardFunctions();
2686
+ }
2687
+ FunctionResolver.prototype.addStandardFunctions = function() {
2688
+ this.functions["{}last"] = Functions.last;
2689
+ this.functions["{}position"] = Functions.position;
2690
+ this.functions["{}count"] = Functions.count;
2691
+ this.functions["{}id"] = Functions.id;
2692
+ this.functions["{}local-name"] = Functions.localName;
2693
+ this.functions["{}namespace-uri"] = Functions.namespaceURI;
2694
+ this.functions["{}name"] = Functions.name;
2695
+ this.functions["{}string"] = Functions.string;
2696
+ this.functions["{}concat"] = Functions.concat;
2697
+ this.functions["{}starts-with"] = Functions.startsWith;
2698
+ this.functions["{}contains"] = Functions.contains;
2699
+ this.functions["{}substring-before"] = Functions.substringBefore;
2700
+ this.functions["{}substring-after"] = Functions.substringAfter;
2701
+ this.functions["{}substring"] = Functions.substring;
2702
+ this.functions["{}string-length"] = Functions.stringLength;
2703
+ this.functions["{}normalize-space"] = Functions.normalizeSpace;
2704
+ this.functions["{}translate"] = Functions.translate;
2705
+ this.functions["{}boolean"] = Functions.boolean_;
2706
+ this.functions["{}not"] = Functions.not;
2707
+ this.functions["{}true"] = Functions.true_;
2708
+ this.functions["{}false"] = Functions.false_;
2709
+ this.functions["{}lang"] = Functions.lang;
2710
+ this.functions["{}number"] = Functions.number;
2711
+ this.functions["{}sum"] = Functions.sum;
2712
+ this.functions["{}floor"] = Functions.floor;
2713
+ this.functions["{}ceiling"] = Functions.ceiling;
2714
+ this.functions["{}round"] = Functions.round;
2715
+ };
2716
+ FunctionResolver.prototype.addFunction = function(ns, ln, f) {
2717
+ this.functions["{" + ns + "}" + ln] = f;
2718
+ };
2719
+ FunctionResolver.getFunctionFromContext = function(qName, context) {
2720
+ var parts = Utilities.resolveQName(qName, context.namespaceResolver, context.contextNode, false);
2721
+ if (parts[0] === null) throw new Error("Cannot resolve QName " + name);
2722
+ return context.functionResolver.getFunction(parts[1], parts[0]);
2723
+ };
2724
+ FunctionResolver.prototype.getFunction = function(localName, namespace) {
2725
+ return this.functions["{" + namespace + "}" + localName];
2726
+ };
2727
+ NamespaceResolver.prototype = /* @__PURE__ */ new Object();
2728
+ NamespaceResolver.prototype.constructor = NamespaceResolver;
2729
+ NamespaceResolver.superclass = Object.prototype;
2730
+ function NamespaceResolver() {}
2731
+ NamespaceResolver.prototype.getNamespace = function(prefix, n) {
2732
+ if (prefix == "xml") return XPath.XML_NAMESPACE_URI;
2733
+ else if (prefix == "xmlns") return XPath.XMLNS_NAMESPACE_URI;
2734
+ if (n.nodeType == 9) n = n.documentElement;
2735
+ else if (n.nodeType == 2) n = PathExpr.getOwnerElement(n);
2736
+ else if (n.nodeType != 1) n = n.parentNode;
2737
+ while (n != null && n.nodeType == 1) {
2738
+ var nnm = n.attributes;
2739
+ for (var i = 0; i < nnm.length; i++) {
2740
+ var a = nnm.item(i);
2741
+ var aname = a.name || a.nodeName;
2742
+ if (aname === "xmlns" && prefix === "" || aname === "xmlns:" + prefix) return String(a.value || a.nodeValue);
2743
+ }
2744
+ n = n.parentNode;
2745
+ }
2746
+ return null;
2747
+ };
2748
+ var Functions = /* @__PURE__ */ new Object();
2749
+ Functions.last = function(c) {
2750
+ if (arguments.length != 1) throw new Error("Function last expects ()");
2751
+ return new XNumber(c.contextSize);
2752
+ };
2753
+ Functions.position = function(c) {
2754
+ if (arguments.length != 1) throw new Error("Function position expects ()");
2755
+ return new XNumber(c.contextPosition);
2756
+ };
2757
+ Functions.count = function() {
2758
+ var c = arguments[0];
2759
+ var ns;
2760
+ if (arguments.length != 2 || !Utilities.instance_of(ns = arguments[1].evaluate(c), XNodeSet)) throw new Error("Function count expects (node-set)");
2761
+ return new XNumber(ns.size);
2762
+ };
2763
+ Functions.id = function() {
2764
+ var c = arguments[0];
2765
+ var id;
2766
+ if (arguments.length != 2) throw new Error("Function id expects (object)");
2767
+ id = arguments[1].evaluate(c);
2768
+ if (Utilities.instance_of(id, XNodeSet)) id = id.toArray().join(" ");
2769
+ else id = id.stringValue();
2770
+ var ids = id.split(/[\x0d\x0a\x09\x20]+/);
2771
+ var count = 0;
2772
+ var ns = new XNodeSet();
2773
+ var doc = c.contextNode.nodeType == 9 ? c.contextNode : c.contextNode.ownerDocument;
2774
+ for (var i = 0; i < ids.length; i++) {
2775
+ var n;
2776
+ if (doc.getElementById) n = doc.getElementById(ids[i]);
2777
+ else n = Utilities.getElementById(doc, ids[i]);
2778
+ if (n != null) {
2779
+ ns.add(n);
2780
+ count++;
2781
+ }
2782
+ }
2783
+ return ns;
2784
+ };
2785
+ Functions.localName = function(c, eNode) {
2786
+ var n;
2787
+ if (arguments.length == 1) n = c.contextNode;
2788
+ else if (arguments.length == 2) n = eNode.evaluate(c).first();
2789
+ else throw new Error("Function local-name expects (node-set?)");
2790
+ if (n == null) return new XString("");
2791
+ return new XString(n.localName || n.baseName || n.target || n.nodeName || "");
2792
+ };
2793
+ Functions.namespaceURI = function() {
2794
+ var c = arguments[0];
2795
+ var n;
2796
+ if (arguments.length == 1) n = c.contextNode;
2797
+ else if (arguments.length == 2) n = arguments[1].evaluate(c).first();
2798
+ else throw new Error("Function namespace-uri expects (node-set?)");
2799
+ if (n == null) return new XString("");
2800
+ return new XString(n.namespaceURI);
2801
+ };
2802
+ Functions.name = function() {
2803
+ var c = arguments[0];
2804
+ var n;
2805
+ if (arguments.length == 1) n = c.contextNode;
2806
+ else if (arguments.length == 2) n = arguments[1].evaluate(c).first();
2807
+ else throw new Error("Function name expects (node-set?)");
2808
+ if (n == null) return new XString("");
2809
+ if (n.nodeType == 1) return new XString(n.nodeName);
2810
+ else if (n.nodeType == 2) return new XString(n.name || n.nodeName);
2811
+ else if (n.nodeType === 7) return new XString(n.target || n.nodeName);
2812
+ else if (n.localName == null) return new XString("");
2813
+ else return new XString(n.localName);
2814
+ };
2815
+ Functions.string = function() {
2816
+ var c = arguments[0];
2817
+ if (arguments.length == 1) return new XString(XNodeSet.prototype.stringForNode(c.contextNode));
2818
+ else if (arguments.length == 2) return arguments[1].evaluate(c).string();
2819
+ throw new Error("Function string expects (object?)");
2820
+ };
2821
+ Functions.concat = function(c) {
2822
+ if (arguments.length < 3) throw new Error("Function concat expects (string, string[, string]*)");
2823
+ var s = "";
2824
+ for (var i = 1; i < arguments.length; i++) s += arguments[i].evaluate(c).stringValue();
2825
+ return new XString(s);
2826
+ };
2827
+ Functions.startsWith = function() {
2828
+ var c = arguments[0];
2829
+ if (arguments.length != 3) throw new Error("Function startsWith expects (string, string)");
2830
+ var s1 = arguments[1].evaluate(c).stringValue();
2831
+ var s2 = arguments[2].evaluate(c).stringValue();
2832
+ return new XBoolean(s1.substring(0, s2.length) == s2);
2833
+ };
2834
+ Functions.contains = function() {
2835
+ var c = arguments[0];
2836
+ if (arguments.length != 3) throw new Error("Function contains expects (string, string)");
2837
+ var s1 = arguments[1].evaluate(c).stringValue();
2838
+ var s2 = arguments[2].evaluate(c).stringValue();
2839
+ return new XBoolean(s1.indexOf(s2) !== -1);
2840
+ };
2841
+ Functions.substringBefore = function() {
2842
+ var c = arguments[0];
2843
+ if (arguments.length != 3) throw new Error("Function substring-before expects (string, string)");
2844
+ var s1 = arguments[1].evaluate(c).stringValue();
2845
+ var s2 = arguments[2].evaluate(c).stringValue();
2846
+ return new XString(s1.substring(0, s1.indexOf(s2)));
2847
+ };
2848
+ Functions.substringAfter = function() {
2849
+ var c = arguments[0];
2850
+ if (arguments.length != 3) throw new Error("Function substring-after expects (string, string)");
2851
+ var s1 = arguments[1].evaluate(c).stringValue();
2852
+ var s2 = arguments[2].evaluate(c).stringValue();
2853
+ if (s2.length == 0) return new XString(s1);
2854
+ var i = s1.indexOf(s2);
2855
+ if (i == -1) return new XString("");
2856
+ return new XString(s1.substring(i + s2.length));
2857
+ };
2858
+ Functions.substring = function() {
2859
+ var c = arguments[0];
2860
+ if (!(arguments.length == 3 || arguments.length == 4)) throw new Error("Function substring expects (string, number, number?)");
2861
+ var s = arguments[1].evaluate(c).stringValue();
2862
+ var n1 = Math.round(arguments[2].evaluate(c).numberValue()) - 1;
2863
+ var n2 = arguments.length == 4 ? n1 + Math.round(arguments[3].evaluate(c).numberValue()) : void 0;
2864
+ return new XString(s.substring(n1, n2));
2865
+ };
2866
+ Functions.stringLength = function() {
2867
+ var c = arguments[0];
2868
+ var s;
2869
+ if (arguments.length == 1) s = XNodeSet.prototype.stringForNode(c.contextNode);
2870
+ else if (arguments.length == 2) s = arguments[1].evaluate(c).stringValue();
2871
+ else throw new Error("Function string-length expects (string?)");
2872
+ return new XNumber(s.length);
2873
+ };
2874
+ Functions.normalizeSpace = function() {
2875
+ var c = arguments[0];
2876
+ var s;
2877
+ if (arguments.length == 1) s = XNodeSet.prototype.stringForNode(c.contextNode);
2878
+ else if (arguments.length == 2) s = arguments[1].evaluate(c).stringValue();
2879
+ else throw new Error("Function normalize-space expects (string?)");
2880
+ var i = 0;
2881
+ var j = s.length - 1;
2882
+ while (Utilities.isSpace(s.charCodeAt(j))) j--;
2883
+ var t = "";
2884
+ while (i <= j && Utilities.isSpace(s.charCodeAt(i))) i++;
2885
+ while (i <= j) if (Utilities.isSpace(s.charCodeAt(i))) {
2886
+ t += " ";
2887
+ while (i <= j && Utilities.isSpace(s.charCodeAt(i))) i++;
2888
+ } else {
2889
+ t += s.charAt(i);
2890
+ i++;
2891
+ }
2892
+ return new XString(t);
2893
+ };
2894
+ Functions.translate = function(c, eValue, eFrom, eTo) {
2895
+ if (arguments.length != 4) throw new Error("Function translate expects (string, string, string)");
2896
+ var value = eValue.evaluate(c).stringValue();
2897
+ var from = eFrom.evaluate(c).stringValue();
2898
+ var to = eTo.evaluate(c).stringValue();
2899
+ var cMap = reduce(function(acc, ch, i) {
2900
+ if (!(ch in acc)) acc[ch] = i > to.length ? "" : to[i];
2901
+ return acc;
2902
+ }, {}, from);
2903
+ return new XString(join("", map(function(ch) {
2904
+ return ch in cMap ? cMap[ch] : ch;
2905
+ }, value)));
2906
+ };
2907
+ Functions.boolean_ = function() {
2908
+ var c = arguments[0];
2909
+ if (arguments.length != 2) throw new Error("Function boolean expects (object)");
2910
+ return arguments[1].evaluate(c).bool();
2911
+ };
2912
+ Functions.not = function(c, eValue) {
2913
+ if (arguments.length != 2) throw new Error("Function not expects (object)");
2914
+ return eValue.evaluate(c).bool().not();
2915
+ };
2916
+ Functions.true_ = function() {
2917
+ if (arguments.length != 1) throw new Error("Function true expects ()");
2918
+ return XBoolean.true_;
2919
+ };
2920
+ Functions.false_ = function() {
2921
+ if (arguments.length != 1) throw new Error("Function false expects ()");
2922
+ return XBoolean.false_;
2923
+ };
2924
+ Functions.lang = function() {
2925
+ var c = arguments[0];
2926
+ if (arguments.length != 2) throw new Error("Function lang expects (string)");
2927
+ var lang;
2928
+ for (var n = c.contextNode; n != null && n.nodeType != 9; n = n.parentNode) {
2929
+ var a = n.getAttributeNS(XPath.XML_NAMESPACE_URI, "lang");
2930
+ if (a != null) {
2931
+ lang = String(a);
2932
+ break;
2933
+ }
2934
+ }
2935
+ if (lang == null) return XBoolean.false_;
2936
+ var s = arguments[1].evaluate(c).stringValue();
2937
+ return new XBoolean(lang.substring(0, s.length) == s && (lang.length == s.length || lang.charAt(s.length) == "-"));
2938
+ };
2939
+ Functions.number = function() {
2940
+ var c = arguments[0];
2941
+ if (!(arguments.length == 1 || arguments.length == 2)) throw new Error("Function number expects (object?)");
2942
+ if (arguments.length == 1) return new XNumber(XNodeSet.prototype.stringForNode(c.contextNode));
2943
+ return arguments[1].evaluate(c).number();
2944
+ };
2945
+ Functions.sum = function() {
2946
+ var c = arguments[0];
2947
+ var ns;
2948
+ if (arguments.length != 2 || !Utilities.instance_of(ns = arguments[1].evaluate(c), XNodeSet)) throw new Error("Function sum expects (node-set)");
2949
+ ns = ns.toUnsortedArray();
2950
+ var n = 0;
2951
+ for (var i = 0; i < ns.length; i++) n += new XNumber(XNodeSet.prototype.stringForNode(ns[i])).numberValue();
2952
+ return new XNumber(n);
2953
+ };
2954
+ Functions.floor = function() {
2955
+ var c = arguments[0];
2956
+ if (arguments.length != 2) throw new Error("Function floor expects (number)");
2957
+ return new XNumber(Math.floor(arguments[1].evaluate(c).numberValue()));
2958
+ };
2959
+ Functions.ceiling = function() {
2960
+ var c = arguments[0];
2961
+ if (arguments.length != 2) throw new Error("Function ceiling expects (number)");
2962
+ return new XNumber(Math.ceil(arguments[1].evaluate(c).numberValue()));
2963
+ };
2964
+ Functions.round = function() {
2965
+ var c = arguments[0];
2966
+ if (arguments.length != 2) throw new Error("Function round expects (number)");
2967
+ return new XNumber(Math.round(arguments[1].evaluate(c).numberValue()));
2968
+ };
2969
+ var Utilities = /* @__PURE__ */ new Object();
2970
+ Utilities.isAttribute = function(val) {
2971
+ return val && (val.nodeType === 2 || val.ownerElement);
2972
+ };
2973
+ Utilities.splitQName = function(qn) {
2974
+ var i = qn.indexOf(":");
2975
+ if (i == -1) return [null, qn];
2976
+ return [qn.substring(0, i), qn.substring(i + 1)];
2977
+ };
2978
+ Utilities.resolveQName = function(qn, nr, n, useDefault) {
2979
+ var parts = Utilities.splitQName(qn);
2980
+ if (parts[0] != null) parts[0] = nr.getNamespace(parts[0], n);
2981
+ else if (useDefault) {
2982
+ parts[0] = nr.getNamespace("", n);
2983
+ if (parts[0] == null) parts[0] = "";
2984
+ } else parts[0] = "";
2985
+ return parts;
2986
+ };
2987
+ Utilities.isSpace = function(c) {
2988
+ return c == 9 || c == 13 || c == 10 || c == 32;
2989
+ };
2990
+ Utilities.isLetter = function(c) {
2991
+ return c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329;
2992
+ };
2993
+ Utilities.isNCNameChar = function(c) {
2994
+ return c >= 48 && c <= 57 || c >= 1632 && c <= 1641 || c >= 1776 && c <= 1785 || c >= 2406 && c <= 2415 || c >= 2534 && c <= 2543 || c >= 2662 && c <= 2671 || c >= 2790 && c <= 2799 || c >= 2918 && c <= 2927 || c >= 3047 && c <= 3055 || c >= 3174 && c <= 3183 || c >= 3302 && c <= 3311 || c >= 3430 && c <= 3439 || c >= 3664 && c <= 3673 || c >= 3792 && c <= 3801 || c >= 3872 && c <= 3881 || c == 46 || c == 45 || c == 95 || Utilities.isLetter(c) || c >= 768 && c <= 837 || c >= 864 && c <= 865 || c >= 1155 && c <= 1158 || c >= 1425 && c <= 1441 || c >= 1443 && c <= 1465 || c >= 1467 && c <= 1469 || c == 1471 || c >= 1473 && c <= 1474 || c == 1476 || c >= 1611 && c <= 1618 || c == 1648 || c >= 1750 && c <= 1756 || c >= 1757 && c <= 1759 || c >= 1760 && c <= 1764 || c >= 1767 && c <= 1768 || c >= 1770 && c <= 1773 || c >= 2305 && c <= 2307 || c == 2364 || c >= 2366 && c <= 2380 || c == 2381 || c >= 2385 && c <= 2388 || c >= 2402 && c <= 2403 || c >= 2433 && c <= 2435 || c == 2492 || c == 2494 || c == 2495 || c >= 2496 && c <= 2500 || c >= 2503 && c <= 2504 || c >= 2507 && c <= 2509 || c == 2519 || c >= 2530 && c <= 2531 || c == 2562 || c == 2620 || c == 2622 || c == 2623 || c >= 2624 && c <= 2626 || c >= 2631 && c <= 2632 || c >= 2635 && c <= 2637 || c >= 2672 && c <= 2673 || c >= 2689 && c <= 2691 || c == 2748 || c >= 2750 && c <= 2757 || c >= 2759 && c <= 2761 || c >= 2763 && c <= 2765 || c >= 2817 && c <= 2819 || c == 2876 || c >= 2878 && c <= 2883 || c >= 2887 && c <= 2888 || c >= 2891 && c <= 2893 || c >= 2902 && c <= 2903 || c >= 2946 && c <= 2947 || c >= 3006 && c <= 3010 || c >= 3014 && c <= 3016 || c >= 3018 && c <= 3021 || c == 3031 || c >= 3073 && c <= 3075 || c >= 3134 && c <= 3140 || c >= 3142 && c <= 3144 || c >= 3146 && c <= 3149 || c >= 3157 && c <= 3158 || c >= 3202 && c <= 3203 || c >= 3262 && c <= 3268 || c >= 3270 && c <= 3272 || c >= 3274 && c <= 3277 || c >= 3285 && c <= 3286 || c >= 3330 && c <= 3331 || c >= 3390 && c <= 3395 || c >= 3398 && c <= 3400 || c >= 3402 && c <= 3405 || c == 3415 || c == 3633 || c >= 3636 && c <= 3642 || c >= 3655 && c <= 3662 || c == 3761 || c >= 3764 && c <= 3769 || c >= 3771 && c <= 3772 || c >= 3784 && c <= 3789 || c >= 3864 && c <= 3865 || c == 3893 || c == 3895 || c == 3897 || c == 3902 || c == 3903 || c >= 3953 && c <= 3972 || c >= 3974 && c <= 3979 || c >= 3984 && c <= 3989 || c == 3991 || c >= 3993 && c <= 4013 || c >= 4017 && c <= 4023 || c == 4025 || c >= 8400 && c <= 8412 || c == 8417 || c >= 12330 && c <= 12335 || c == 12441 || c == 12442 || c == 183 || c == 720 || c == 721 || c == 903 || c == 1600 || c == 3654 || c == 3782 || c == 12293 || c >= 12337 && c <= 12341 || c >= 12445 && c <= 12446 || c >= 12540 && c <= 12542;
2995
+ };
2996
+ Utilities.coalesceText = function(n) {
2997
+ for (var m = n.firstChild; m != null; m = m.nextSibling) if (m.nodeType == 3 || m.nodeType == 4) {
2998
+ var s = m.nodeValue;
2999
+ var first = m;
3000
+ m = m.nextSibling;
3001
+ while (m != null && (m.nodeType == 3 || m.nodeType == 4)) {
3002
+ s += m.nodeValue;
3003
+ var del = m;
3004
+ m = m.nextSibling;
3005
+ del.parentNode.removeChild(del);
3006
+ }
3007
+ if (first.nodeType == 4) {
3008
+ var p = first.parentNode;
3009
+ if (first.nextSibling == null) {
3010
+ p.removeChild(first);
3011
+ p.appendChild(p.ownerDocument.createTextNode(s));
3012
+ } else {
3013
+ var next = first.nextSibling;
3014
+ p.removeChild(first);
3015
+ p.insertBefore(p.ownerDocument.createTextNode(s), next);
3016
+ }
3017
+ } else first.nodeValue = s;
3018
+ if (m == null) break;
3019
+ } else if (m.nodeType == 1) Utilities.coalesceText(m);
3020
+ };
3021
+ Utilities.instance_of = function(o, c) {
3022
+ while (o != null) {
3023
+ if (o.constructor === c) return true;
3024
+ if (o === Object) return false;
3025
+ o = o.constructor.superclass;
3026
+ }
3027
+ return false;
3028
+ };
3029
+ Utilities.getElementById = function(n, id) {
3030
+ if (n.nodeType == 1) {
3031
+ if (n.getAttribute("id") == id || n.getAttributeNS(null, "id") == id) return n;
3032
+ }
3033
+ for (var m = n.firstChild; m != null; m = m.nextSibling) {
3034
+ var res = Utilities.getElementById(m, id);
3035
+ if (res != null) return res;
3036
+ }
3037
+ return null;
3038
+ };
3039
+ var XPathException = (function() {
3040
+ function getMessage(code, exception) {
3041
+ var msg = exception ? ": " + exception.toString() : "";
3042
+ switch (code) {
3043
+ case XPathException$1.INVALID_EXPRESSION_ERR: return "Invalid expression" + msg;
3044
+ case XPathException$1.TYPE_ERR: return "Type error" + msg;
3045
+ }
3046
+ return null;
3047
+ }
3048
+ function XPathException$1(code, error, message) {
3049
+ var err = Error.call(this, getMessage(code, error) || message);
3050
+ err.code = code;
3051
+ err.exception = error;
3052
+ return err;
3053
+ }
3054
+ XPathException$1.prototype = Object.create(Error.prototype);
3055
+ XPathException$1.prototype.constructor = XPathException$1;
3056
+ XPathException$1.superclass = Error;
3057
+ XPathException$1.prototype.toString = function() {
3058
+ return this.message;
3059
+ };
3060
+ XPathException$1.fromMessage = function(message, error) {
3061
+ return new XPathException$1(null, error, message);
3062
+ };
3063
+ XPathException$1.INVALID_EXPRESSION_ERR = 51;
3064
+ XPathException$1.TYPE_ERR = 52;
3065
+ return XPathException$1;
3066
+ })();
3067
+ XPathExpression.prototype = {};
3068
+ XPathExpression.prototype.constructor = XPathExpression;
3069
+ XPathExpression.superclass = Object.prototype;
3070
+ function XPathExpression(e, r, p) {
3071
+ this.xpath = p.parse(e);
3072
+ this.context = new XPathContext();
3073
+ this.context.namespaceResolver = new XPathNSResolverWrapper(r);
3074
+ }
3075
+ XPathExpression.getOwnerDocument = function(n) {
3076
+ return n.nodeType === 9 ? n : n.ownerDocument;
3077
+ };
3078
+ XPathExpression.detectHtmlDom = function(n) {
3079
+ if (!n) return false;
3080
+ var doc = XPathExpression.getOwnerDocument(n);
3081
+ try {
3082
+ return doc.implementation.hasFeature("HTML", "2.0");
3083
+ } catch (e) {
3084
+ return true;
3085
+ }
3086
+ };
3087
+ XPathExpression.prototype.evaluate = function(n, t, res) {
3088
+ this.context.expressionContextNode = n;
3089
+ this.context.caseInsensitive = XPathExpression.detectHtmlDom(n);
3090
+ return new XPathResult(this.xpath.evaluate(this.context), t);
3091
+ };
3092
+ XPathNSResolverWrapper.prototype = {};
3093
+ XPathNSResolverWrapper.prototype.constructor = XPathNSResolverWrapper;
3094
+ XPathNSResolverWrapper.superclass = Object.prototype;
3095
+ function XPathNSResolverWrapper(r) {
3096
+ this.xpathNSResolver = r;
3097
+ }
3098
+ XPathNSResolverWrapper.prototype.getNamespace = function(prefix, n) {
3099
+ if (this.xpathNSResolver == null) return null;
3100
+ return this.xpathNSResolver.lookupNamespaceURI(prefix);
3101
+ };
3102
+ NodeXPathNSResolver.prototype = {};
3103
+ NodeXPathNSResolver.prototype.constructor = NodeXPathNSResolver;
3104
+ NodeXPathNSResolver.superclass = Object.prototype;
3105
+ function NodeXPathNSResolver(n) {
3106
+ this.node = n;
3107
+ this.namespaceResolver = new NamespaceResolver();
3108
+ }
3109
+ NodeXPathNSResolver.prototype.lookupNamespaceURI = function(prefix) {
3110
+ return this.namespaceResolver.getNamespace(prefix, this.node);
3111
+ };
3112
+ XPathResult.prototype = {};
3113
+ XPathResult.prototype.constructor = XPathResult;
3114
+ XPathResult.superclass = Object.prototype;
3115
+ function XPathResult(v, t) {
3116
+ if (t == XPathResult.ANY_TYPE) {
3117
+ if (v.constructor === XString) t = XPathResult.STRING_TYPE;
3118
+ else if (v.constructor === XNumber) t = XPathResult.NUMBER_TYPE;
3119
+ else if (v.constructor === XBoolean) t = XPathResult.BOOLEAN_TYPE;
3120
+ else if (v.constructor === XNodeSet) t = XPathResult.UNORDERED_NODE_ITERATOR_TYPE;
3121
+ }
3122
+ this.resultType = t;
3123
+ switch (t) {
3124
+ case XPathResult.NUMBER_TYPE:
3125
+ this.numberValue = v.numberValue();
3126
+ return;
3127
+ case XPathResult.STRING_TYPE:
3128
+ this.stringValue = v.stringValue();
3129
+ return;
3130
+ case XPathResult.BOOLEAN_TYPE:
3131
+ this.booleanValue = v.booleanValue();
3132
+ return;
3133
+ case XPathResult.ANY_UNORDERED_NODE_TYPE:
3134
+ case XPathResult.FIRST_ORDERED_NODE_TYPE:
3135
+ if (v.constructor === XNodeSet) {
3136
+ this.singleNodeValue = v.first();
3137
+ return;
3138
+ }
3139
+ break;
3140
+ case XPathResult.UNORDERED_NODE_ITERATOR_TYPE:
3141
+ case XPathResult.ORDERED_NODE_ITERATOR_TYPE:
3142
+ if (v.constructor === XNodeSet) {
3143
+ this.invalidIteratorState = false;
3144
+ this.nodes = v.toArray();
3145
+ this.iteratorIndex = 0;
3146
+ return;
3147
+ }
3148
+ break;
3149
+ case XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE:
3150
+ case XPathResult.ORDERED_NODE_SNAPSHOT_TYPE:
3151
+ if (v.constructor === XNodeSet) {
3152
+ this.nodes = v.toArray();
3153
+ this.snapshotLength = this.nodes.length;
3154
+ return;
3155
+ }
3156
+ break;
3157
+ }
3158
+ throw new XPathException(XPathException.TYPE_ERR);
3159
+ }
3160
+ XPathResult.prototype.iterateNext = function() {
3161
+ if (this.resultType != XPathResult.UNORDERED_NODE_ITERATOR_TYPE && this.resultType != XPathResult.ORDERED_NODE_ITERATOR_TYPE) throw new XPathException(XPathException.TYPE_ERR);
3162
+ return this.nodes[this.iteratorIndex++];
3163
+ };
3164
+ XPathResult.prototype.snapshotItem = function(i) {
3165
+ if (this.resultType != XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE && this.resultType != XPathResult.ORDERED_NODE_SNAPSHOT_TYPE) throw new XPathException(XPathException.TYPE_ERR);
3166
+ return this.nodes[i];
3167
+ };
3168
+ XPathResult.ANY_TYPE = 0;
3169
+ XPathResult.NUMBER_TYPE = 1;
3170
+ XPathResult.STRING_TYPE = 2;
3171
+ XPathResult.BOOLEAN_TYPE = 3;
3172
+ XPathResult.UNORDERED_NODE_ITERATOR_TYPE = 4;
3173
+ XPathResult.ORDERED_NODE_ITERATOR_TYPE = 5;
3174
+ XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE = 6;
3175
+ XPathResult.ORDERED_NODE_SNAPSHOT_TYPE = 7;
3176
+ XPathResult.ANY_UNORDERED_NODE_TYPE = 8;
3177
+ XPathResult.FIRST_ORDERED_NODE_TYPE = 9;
3178
+ function installDOM3XPathSupport(doc, p) {
3179
+ doc.createExpression = function(e, r) {
3180
+ try {
3181
+ return new XPathExpression(e, r, p);
3182
+ } catch (e$1) {
3183
+ throw new XPathException(XPathException.INVALID_EXPRESSION_ERR, e$1);
3184
+ }
3185
+ };
3186
+ doc.createNSResolver = function(n) {
3187
+ return new NodeXPathNSResolver(n);
3188
+ };
3189
+ doc.evaluate = function(e, cn, r, t, res) {
3190
+ if (t < 0 || t > 9) throw {
3191
+ code: 0,
3192
+ toString: function() {
3193
+ return "Request type not supported";
3194
+ }
3195
+ };
3196
+ return doc.createExpression(e, r, p).evaluate(cn, t, res);
3197
+ };
3198
+ }
3199
+ try {
3200
+ var shouldInstall = true;
3201
+ try {
3202
+ if (document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("XPath", null)) shouldInstall = false;
3203
+ } catch (e) {}
3204
+ if (shouldInstall) installDOM3XPathSupport(document, new XPathParser());
3205
+ } catch (e) {}
3206
+ installDOM3XPathSupport(exports$1, new XPathParser());
3207
+ (function() {
3208
+ var parser = new XPathParser();
3209
+ var defaultNSResolver = new NamespaceResolver();
3210
+ var defaultFunctionResolver = new FunctionResolver();
3211
+ var defaultVariableResolver = new VariableResolver();
3212
+ function makeNSResolverFromFunction(func) {
3213
+ return { getNamespace: function(prefix, node) {
3214
+ return func(prefix, node) || defaultNSResolver.getNamespace(prefix, node);
3215
+ } };
3216
+ }
3217
+ function makeNSResolverFromObject(obj) {
3218
+ return makeNSResolverFromFunction(obj.getNamespace.bind(obj));
3219
+ }
3220
+ function makeNSResolverFromMap(map$1) {
3221
+ return makeNSResolverFromFunction(function(prefix) {
3222
+ return map$1[prefix];
3223
+ });
3224
+ }
3225
+ function makeNSResolver(resolver) {
3226
+ if (resolver && typeof resolver.getNamespace === "function") return makeNSResolverFromObject(resolver);
3227
+ if (typeof resolver === "function") return makeNSResolverFromFunction(resolver);
3228
+ if (typeof resolver === "object") return makeNSResolverFromMap(resolver);
3229
+ return defaultNSResolver;
3230
+ }
3231
+ /** Converts native JavaScript types to their XPath library equivalent */
3232
+ function convertValue(value) {
3233
+ if (value === null || typeof value === "undefined" || value instanceof XString || value instanceof XBoolean || value instanceof XNumber || value instanceof XNodeSet) return value;
3234
+ switch (typeof value) {
3235
+ case "string": return new XString(value);
3236
+ case "boolean": return new XBoolean(value);
3237
+ case "number": return new XNumber(value);
3238
+ }
3239
+ var ns = new XNodeSet();
3240
+ ns.addArray([].concat(value));
3241
+ return ns;
3242
+ }
3243
+ function makeEvaluator(func) {
3244
+ return function(context) {
3245
+ var args = Array.prototype.slice.call(arguments, 1).map(function(arg) {
3246
+ return arg.evaluate(context);
3247
+ });
3248
+ return convertValue(func.apply(this, [].concat(context, args)));
3249
+ };
3250
+ }
3251
+ function makeFunctionResolverFromFunction(func) {
3252
+ return { getFunction: function(name$1, namespace) {
3253
+ var found = func(name$1, namespace);
3254
+ if (found) return makeEvaluator(found);
3255
+ return defaultFunctionResolver.getFunction(name$1, namespace);
3256
+ } };
3257
+ }
3258
+ function makeFunctionResolverFromObject(obj) {
3259
+ return makeFunctionResolverFromFunction(obj.getFunction.bind(obj));
3260
+ }
3261
+ function makeFunctionResolverFromMap(map$1) {
3262
+ return makeFunctionResolverFromFunction(function(name$1) {
3263
+ return map$1[name$1];
3264
+ });
3265
+ }
3266
+ function makeFunctionResolver(resolver) {
3267
+ if (resolver && typeof resolver.getFunction === "function") return makeFunctionResolverFromObject(resolver);
3268
+ if (typeof resolver === "function") return makeFunctionResolverFromFunction(resolver);
3269
+ if (typeof resolver === "object") return makeFunctionResolverFromMap(resolver);
3270
+ return defaultFunctionResolver;
3271
+ }
3272
+ function makeVariableResolverFromFunction(func) {
3273
+ return { getVariable: function(name$1, namespace) {
3274
+ return convertValue(func(name$1, namespace));
3275
+ } };
3276
+ }
3277
+ function makeVariableResolver(resolver) {
3278
+ if (resolver) {
3279
+ if (typeof resolver.getVariable === "function") return makeVariableResolverFromFunction(resolver.getVariable.bind(resolver));
3280
+ if (typeof resolver === "function") return makeVariableResolverFromFunction(resolver);
3281
+ if (typeof resolver === "object") return makeVariableResolverFromFunction(function(name$1) {
3282
+ return resolver[name$1];
3283
+ });
3284
+ }
3285
+ return defaultVariableResolver;
3286
+ }
3287
+ function copyIfPresent(prop, dest, source) {
3288
+ if (prop in source) dest[prop] = source[prop];
3289
+ }
3290
+ function makeContext(options) {
3291
+ var context = new XPathContext();
3292
+ if (options) {
3293
+ context.namespaceResolver = makeNSResolver(options.namespaces);
3294
+ context.functionResolver = makeFunctionResolver(options.functions);
3295
+ context.variableResolver = makeVariableResolver(options.variables);
3296
+ context.expressionContextNode = options.node;
3297
+ copyIfPresent("allowAnyNamespaceForNoPrefix", context, options);
3298
+ copyIfPresent("isHtml", context, options);
3299
+ } else context.namespaceResolver = defaultNSResolver;
3300
+ return context;
3301
+ }
3302
+ function evaluate(parsedExpression, options) {
3303
+ var context = makeContext(options);
3304
+ return parsedExpression.evaluate(context);
3305
+ }
3306
+ var evaluatorPrototype = {
3307
+ evaluate: function(options) {
3308
+ return evaluate(this.expression, options);
3309
+ },
3310
+ evaluateNumber: function(options) {
3311
+ return this.evaluate(options).numberValue();
3312
+ },
3313
+ evaluateString: function(options) {
3314
+ return this.evaluate(options).stringValue();
3315
+ },
3316
+ evaluateBoolean: function(options) {
3317
+ return this.evaluate(options).booleanValue();
3318
+ },
3319
+ evaluateNodeSet: function(options) {
3320
+ return this.evaluate(options).nodeset();
3321
+ },
3322
+ select: function(options) {
3323
+ return this.evaluateNodeSet(options).toArray();
3324
+ },
3325
+ select1: function(options) {
3326
+ return this.select(options)[0];
3327
+ }
3328
+ };
3329
+ function parse(xpath) {
3330
+ var parsed = parser.parse(xpath);
3331
+ return Object.create(evaluatorPrototype, { expression: { value: parsed } });
3332
+ }
3333
+ exports$1.parse = parse;
3334
+ })();
3335
+ assign(exports$1, {
3336
+ XPath,
3337
+ XPathParser,
3338
+ XPathResult,
3339
+ Step,
3340
+ PathExpr,
3341
+ NodeTest,
3342
+ LocationPath,
3343
+ OrOperation,
3344
+ AndOperation,
3345
+ BarOperation,
3346
+ EqualsOperation,
3347
+ NotEqualOperation,
3348
+ LessThanOperation,
3349
+ GreaterThanOperation,
3350
+ LessThanOrEqualOperation,
3351
+ GreaterThanOrEqualOperation,
3352
+ PlusOperation,
3353
+ MinusOperation,
3354
+ MultiplyOperation,
3355
+ DivOperation,
3356
+ ModOperation,
3357
+ UnaryMinusOperation,
3358
+ FunctionCall,
3359
+ VariableReference,
3360
+ XPathContext,
3361
+ XNodeSet,
3362
+ XBoolean,
3363
+ XString,
3364
+ XNumber,
3365
+ NamespaceResolver,
3366
+ FunctionResolver,
3367
+ VariableResolver,
3368
+ Utilities
3369
+ });
3370
+ exports$1.select = function(e, doc, single) {
3371
+ return exports$1.selectWithResolver(e, doc, null, single);
3372
+ };
3373
+ exports$1.useNamespaces = function(mappings) {
3374
+ var resolver = {
3375
+ mappings: mappings || {},
3376
+ lookupNamespaceURI: function(prefix) {
3377
+ return this.mappings[prefix];
3378
+ }
3379
+ };
3380
+ return function(e, doc, single) {
3381
+ return exports$1.selectWithResolver(e, doc, resolver, single);
3382
+ };
3383
+ };
3384
+ exports$1.selectWithResolver = function(e, doc, resolver, single) {
3385
+ var expression = new XPathExpression(e, resolver, new XPathParser());
3386
+ var type = XPathResult.ANY_TYPE;
3387
+ var result = expression.evaluate(doc, type, null);
3388
+ if (result.resultType == XPathResult.STRING_TYPE) result = result.stringValue;
3389
+ else if (result.resultType == XPathResult.NUMBER_TYPE) result = result.numberValue;
3390
+ else if (result.resultType == XPathResult.BOOLEAN_TYPE) result = result.booleanValue;
3391
+ else {
3392
+ result = result.nodes;
3393
+ if (single) result = result[0];
3394
+ }
3395
+ return result;
3396
+ };
3397
+ exports$1.select1 = function(e, doc) {
3398
+ return exports$1.select(e, doc, true);
3399
+ };
3400
+ })(typeof exports === "undefined" ? {} : exports);
3401
+ }) });
3402
+
3403
+ //#endregion
3404
+ export default require_xpath();
3405
+
3406
+ export { require_xpath };
3407
+ //# sourceMappingURL=xpath.mjs.map