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