xml-explorer 0.1.0 → 0.1.1
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.
Potentially problematic release.
This version of xml-explorer might be problematic. Click here for more details.
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),we=require("@monaco-editor/react"),De=require("monaco-editor");function Re(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:()=>t[i]})}}return r.default=t,Object.freeze(r)}const Be=Re(De);var ue={exports:{}},se={};var pe;function Oe(){if(pe)return se;pe=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(n,o,c){var d=null;if(c!==void 0&&(d=""+c),o.key!==void 0&&(d=""+o.key),"key"in o){c={};for(var m in o)m!=="key"&&(c[m]=o[m])}else c=o;return o=c.ref,{$$typeof:t,type:n,key:d,ref:o!==void 0?o:null,props:c}}return se.Fragment=r,se.jsx=i,se.jsxs=i,se}var oe={};var me;function Pe(){return me||(me=1,process.env.NODE_ENV!=="production"&&(function(){function t(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===G?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case W:return"Profiler";case z:return"StrictMode";case ee:return"Suspense";case U:return"SuspenseList";case $:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case F:return"Portal";case Z:return e.displayName||"Context";case L:return(e._context.displayName||"Context")+".Consumer";case V:var p=e.render;return e=e.displayName,e||(e=p.displayName||p.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ie:return p=e.displayName||null,p!==null?p:t(e.type)||"Memo";case M:p=e._payload,e=e._init;try{return t(e(p))}catch{}}return null}function r(e){return""+e}function i(e){try{r(e);var p=!1}catch{p=!0}if(p){p=console;var g=p.error,v=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return g.call(p,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",v),r(e)}}function n(e){if(e===j)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===M)return"<...>";try{var p=t(e);return p?"<"+p+">":"<...>"}catch{return"<...>"}}function o(){var e=S.A;return e===null?null:e.getOwner()}function c(){return Error("react-stack-top-frame")}function d(e){if(T.call(e,"key")){var p=Object.getOwnPropertyDescriptor(e,"key").get;if(p&&p.isReactWarning)return!1}return e.key!==void 0}function m(e,p){function g(){x||(x=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",p))}g.isReactWarning=!0,Object.defineProperty(e,"key",{get:g,configurable:!0})}function f(){var e=t(this.type);return B[e]||(B[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function b(e,p,g,v,te,a){var s=g.ref;return e={$$typeof:k,type:e,key:p,props:g,_owner:v},(s!==void 0?s:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:f}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function D(e,p,g,v,te,a){var s=p.children;if(s!==void 0)if(v)if(u(s)){for(v=0;v<s.length;v++)_(s[v]);Object.freeze&&Object.freeze(s)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _(s);if(T.call(p,"key")){s=t(e);var C=Object.keys(p).filter(function(w){return w!=="key"});v=0<C.length?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}",ae[s+v]||(C=0<C.length?"{"+C.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,x,s,A,s),ie[s+x]=!0)}if(s=null,C!==void 0&&(i(C),s=""+C),m(u)&&(i(u.key),s=""+u.key),"key"in u){C={};for(var f in u)f!=="key"&&(C[f]=u[f])}else C=u;return s&&p(C,typeof e=="function"?e.displayName||e.name||"Unknown":e),b(e,s,C,d(),re,n)}function k(e){B(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===O&&(e._payload.status==="fulfilled"?B(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function B(e){return typeof e=="object"&&e!==null&&e.$$typeof===j}var v=l,j=Symbol.for("react.transitional.element"),G=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),Z=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),U=Symbol.for("react.client.reference"),S=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,h=Object.prototype.hasOwnProperty,o=Array.isArray,I=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(e){return e()}};var P,L={},F=v.react_stack_bottom_frame.bind(v,c)(),_=I(t(c)),ie={};de.Fragment=$,de.jsx=function(e,u,C){var x=1e4>S.recentlyCreatedOwnerStacks++;return D(e,u,C,!1,x?Error("react-stack-top-frame"):F,x?I(t(e)):_)},de.jsxs=function(e,u,C){var x=1e4>S.recentlyCreatedOwnerStacks++;return D(e,u,C,!0,x?Error("react-stack-top-frame"):F,x?I(t(e)):_)}})()),de}var ye;function we(){return ye||(ye=1,process.env.NODE_ENV==="production"?oe.exports=Le():oe.exports=He()),oe.exports}var T=we();const Se={id:"EN16931",title:"EN16931 Business Terms",xpaths:{ubl:"/ubl:Invoice",cii:"/rsm:CrossIndustryInvoice"},children:[{id:"BT-1",title:"BT-1 Invoice number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:ID"}},{id:"BT-2",title:"BT-2 Invoice issue date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString"}},{id:"BT-3",title:"BT-3 Invoice type code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:TypeCode"}},{id:"BT-5",title:"BT-5 Invoice currency code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode"}},{id:"BT-6",title:"BT-6 VAT accounting currency code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode"}},{id:"BT-7",title:"BT-7 Value added tax point date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:TaxPointDate/udt:DateString"}},{id:"BT-8",title:"BT-8 Value added tax point date code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:DueDateTypeCode"}},{id:"BT-9",title:"BT-9 Payment due date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:DueDateDateTime/udt:DateTimeString"}},{id:"BT-10",title:"BT-10 Buyer reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerReference"}},{id:"BT-11",title:"BT-11 Project reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SpecifiedProcuringProject/ram:ID"}},{id:"BT-12",title:"BT-12 Contract reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:ContractReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-13",title:"BT-13 Purchase order reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerOrderReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-14",title:"BT-14 Sales order reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerOrderReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-15",title:"BT-15 Receiving advice reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ReceivingAdviceReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-16",title:"BT-16 Despatch advice reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:DespatchAdviceReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-17",title:"BT-17 Tender or lot reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-18",title:"BT-18 Invoiced object identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID"},children:[{id:"BT-18-1",title:"BT-18-1 Scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:ReferenceTypeCode"}}]},{id:"BT-19",title:"BT-19 Buyer accounting reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ReceivableSpecifiedTradeAccountingAccount/ram:ID"}},{id:"BT-20",title:"BT-20 Payment terms",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:Description"}},{id:"BG-1",title:"BG-1 INVOICE NOTE",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote"},children:[{id:"BT-21",title:"BT-21 Invoice note subject code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote/ram:SubjectCode"}},{id:"BT-22",title:"BT-22 Invoice note",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote/ram:Content"}}]},{id:"BG-2",title:"BG-2 PROCESS CONTROL",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext"},children:[{id:"BT-23",title:"BT-23 Business process type",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram: BusinessProcessSpecifiedDocumentContextParameter/ram:ID"}},{id:"BT-24",title:"BT-24 Specification identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID"}}]},{id:"BG-3",title:"BG-3 PRECEDING INVOICE REFERENCE",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument"},children:[{id:"BT-25",title:"BT-25 Preceding Invoice number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-26",title:"BT-26 Preceding Invoice issue date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument/ram:FormattedIssueDateTime/qdt:DateTimeString"}}]},{id:"BG-5",title:"BG-5 SELLER",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty"},children:[{id:"BT-35",title:"BT-35 Seller address line 1",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:LineOne"}},{id:"BT-36",title:"BT-36 Seller address line 2",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:LineTwo"}},{id:"BT-162",title:"BT-162 Seller address line 3",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:LineThree"}},{id:"BT-37",title:"BT-37 Seller city",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CityName"}},{id:"BT-38",title:"BT-38 Seller post code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"}},{id:"BT-39",title:"BT-39 Seller country subdivision",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"}},{id:"BT-40",title:"BT-40 Seller country code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID"}},{id:"BG-6",title:"BG-6 SELLER CONTACT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact"},children:[{id:"BT-41",title:"BT-41 Seller contact point",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact/ram:PersonName"}},{id:"BT-42",title:"BT-42 Seller contact telephone number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact/ram:TelephoneUniversalCommunication/ram:CompleteNumber"}},{id:"BT-43",title:"BT-43 Seller contact email address",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact/ram:EmailURIUniversalCommunication/ram:URIID"}}]}]},{id:"BG-7",title:"BG-7 BUYER",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty"},children:[{id:"BT-44",title:"BT-44 Buyer name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:Name"}},{id:"BT-45",title:"BT-45 Buyer trading name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:TradingBusinessName"}},{id:"BT-46",title:"BT-46 Buyer identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:ID"},children:[{id:"BT-46-1",title:"BT-46-1 Buyer identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:GlobalID/@schemeID"}}]},{id:"BT-47",title:"BT-47 Buyer legal registration identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID"},children:[{id:"BT-47-1",title:"BT-47-1 Buyer legal registration identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID/@schemeID"}}]},{id:"BT-48",title:"BT-48 Buyer VAT identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID"}},{id:"BT-49",title:"BT-49 Buyer electronic address",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication/ram:URIID"},children:[{id:"BT-49-1",title:"BT-49-1 Buyer electronic address identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication/ram:URIID/@schemeID"}}]},{id:"BG-8",title:"BG-8 BUYER POSTAL ADDRESS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress"},children:[{id:"BT-50",title:"BT-50 Buyer address line 1",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:LineOne"}},{id:"BT-51",title:"BT-51 Buyer address line 2",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:LineTwo"}},{id:"BT-163",title:"BT-163 Buyer address line 3",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:LineThree"}},{id:"BT-52",title:"BT-52 Buyer city",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CityName"}},{id:"BT-53",title:"BT-53 Buyer post code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"}},{id:"BT-54",title:"BT-54 Buyer country subdivision",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"}},{id:"BT-55",title:"BT-55 Buyer country code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountryID"}}]},{id:"BG-9",title:"BG-9 BUYER CONTACT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact"},children:[{id:"BT-56",title:"BT-56 Buyer contact point",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact/ram:PersonName"}},{id:"BT-57",title:"BT-57 Buyer contact telephone number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact/ram:TelephoneUniversalCommunication/ram:CompleteNumber"}},{id:"BT-58",title:"BT-58 Buyer contact email address",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact/ram:EmailURIUniversalCommunication/ram:URIID"}}]}]},{id:"BG-10",title:"BG-10 PAYEE",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty"},children:[{id:"BT-59",title:"BT-59 Payee name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:Name"}},{id:"BT-60",title:"BT-60 Payee identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:ID"},children:[{id:"BT-60-1",title:"BT-60-1 Payee identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:GlobalID/@schemeID"}}]},{id:"BT-61",title:"BT-61 Payee legal registration identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:ID"},children:[{id:"BT-61-1",title:"BT-61-1 Payee legal registration identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:ID/@schemeID"}}]}]},{id:"BG-11",title:"BG-11 SELLER TAX REPRESENTATIVE PARTY",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty"},children:[{id:"BT-62",title:"BT-62 Seller tax representa-tive name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:Name"}},{id:"BT-63",title:"BT-63 Seller tax representa-tive VAT identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID"}},{id:"BG-12",title:"BG-12 SELLER TAX REPRESENTATIVE POSTAL ADDRESS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress"},children:[{id:"BT-64",title:"BT-64 Tax representa-tive address line 1",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:LineOne"}},{id:"BT-65",title:"BT-65 Tax representa-tive address line 2",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:LineTwo"}},{id:"BT-164",title:"BT-164 Tax representative address line 3",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:LineThree"}},{id:"BT-66",title:"BT-66 Tax representa-tive city",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CityName"}},{id:"BT-67",title:"BT-67 Tax representa-tive post code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"}},{id:"BT-68",title:"BT-68 Tax representa-tive country subdivision",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"}},{id:"BT-69",title:"BT-69 Tax representa-tive country code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CountryID"}}]}]},{id:"BG-13",title:"BG-13 DELIVERY INFORMATION",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty"},children:[{id:"BT-70",title:"BT-70 Deliver to party name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:Name"}},{id:"BT-71",title:"BT-71 Deliver to location identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:ID"},children:[{id:"BT-71-1",title:"BT-71-1 Deliver to location identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:GlobalID/@schemeID"}}]},{id:"BT-72",title:"BT-72 Actual delivery date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ActualDeliverySupplyChainEvent/ram:OccurrenceDateTime/udt:DateTimeString"}},{id:"BG-14",title:"BG-14 DELIVERY OR INVOICE PERIOD",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod"},children:[{id:"BT-73",title:"BT-73 Invoicing period start date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod/ram:StartDateTime/udt:DateTimeString"}},{id:"BT-74",title:"BT-74 Invoicing period end date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod/ram:EndDateTime/udt:DateTimeString"}}]},{id:"BG-15",title:"BG-15 DELIVER TO ADDRESS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress"},children:[{id:"BT-75",title:"BT-75 Deliver to address line 1",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:LineOne"}},{id:"BT-76",title:"BT-76 Deliver to address line 2",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:LineTwo"}},{id:"BT-165",title:"BT-165 Deliver to address line 3",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:LineThree"}},{id:"BT-77",title:"BT-77 Deliver to city",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CityName"}},{id:"BT-78",title:"BT-78 Deliver to post code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"}},{id:"BT-79",title:"BT-79 Deliver to country subdivision",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"}},{id:"BT-80",title:"BT-80 Deliver to country code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID"}}]}]},{id:"BG-16",title:"BG-16 PAYMENT INSTRUC-TIONS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans"},children:[{id:"BT-81",title:"BT-81 Payment means type code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:TypeCode"}},{id:"BT-82",title:"BT-82 Payment means text",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:Information"}},{id:"BT-83",title:"BT-83 Remittance information",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PaymentReference"}},{id:"BG-17",title:"BG-17 CREDIT TRANSFER",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount"},children:[{id:"BT-84",title:"BT-84 Payment account identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount/ram:IBANID"}},{id:"BT-85",title:"BT-85 Payment account name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount/ram:AccountName"}},{id:"BT-86",title:"BT-86 Payment service provider identifier"}]},{id:"BG-18",title:"BG-18 PAYMENT CARD INFORMA-TION",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard"},children:[{id:"BT-87",title:"BT-87 Payment card primary account number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard/ram:ID"}},{id:"BT-88",title:"BT-88 Payment card holder name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard/ram:CardholderName"}}]},{id:"BG-19",title:"BG-19 DIRECT DEBIT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement"},children:[{id:"BT-89",title:"BT-89 Mandate reference identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:DirectDebitMandateID"}},{id:"BT-90",title:"BT-90 Bank assigned creditor identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:CreditorReferenceID"}},{id:"BT-91",title:"BT-91 Debited account identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayerPartyDebtorFinancialAccount/ram:IBANID"}}]}]},{id:"BG-20",title:"BG-20 DOCUMENT LEVEL ALLOW-ANCES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge"},children:[{id:"BT-92",title:"BT-92 Document level allowance amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-93",title:"BT-93 Document level allowance base amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"}},{id:"BT-94",title:"BT-94 Document level allowance percentage",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"}},{id:"BT-95",title:"BT-95 Document level allowance VAT category code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:TypeCode"}},{id:"BT-96",title:"BT-96 Document level allowance VAT rate",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:RateApplicablePercent"}},{id:"BT-97",title:"BT-97 Document level allowance reason",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"}},{id:"BT-98",title:"BT-98 Document level allowance reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"}}]},{id:"BG-21",title:"BG-21 DOCUMENT LEVEL CHARGES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge"},children:[{id:"BT-99",title:"BT-99 Document level charge amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-100",title:"BT-100 Document level charge base amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"}},{id:"BT-101",title:"BT-101 Document level charge percentage",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"}},{id:"BT-102",title:"BT-102 Document level charge VAT category code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:TypeCode"}},{id:"BT-103",title:"BT-103 Document level charge VAT rate",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:RateApplicablePercent"}},{id:"BT-104",title:"BT-104 Document level charge reason",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"}},{id:"BT-105",title:"BT-105 Document level charge reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"}}]},{id:"BG-22",title:"BG-22 DOCUMENT TOTALS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation"},children:[{id:"BT-106",title:"BT-106 Sum of Invoice line net amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:LineTotalAmount"}},{id:"BT-107",title:"BT-107 Sum of allowances on document level",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:AllowanceTotalAmount"}},{id:"BT-108",title:"BT-108 Sum of charges on document level",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount"}},{id:"BT-109",title:"BT-109 Invoice total amount without VAT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxBasisTotalAmount"}},{id:"BT-110",title:"BT-110 Invoice total VAT amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount"}},{id:"BT-111",title:"BT-111 Invoice total VAT amount in accounting currency",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount"}},{id:"BT-112",title:"BT-112 Invoice total amount with VAT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:GrandTotalAmount"}},{id:"BT-113",title:"BT-113 Paid amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TotalPrepaidAmount"}},{id:"BT-114",title:"BT-114 Rounding amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:RoundingAmount"}},{id:"BT-115",title:"BT-115 Amount due for payment",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:DuePayableAmount"}}]},{id:"BG-23",title:"BG-23 VAT BREAK-DOWN",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax"},children:[{id:"BT-116",title:"BT-116 VAT category taxable amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:BasisAmount"}},{id:"BT-117",title:"BT-117 VAT category tax amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CalculatedAmount"}},{id:"BT-118",title:"BT-118 VAT category code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:TypeCode"}},{id:"BT-119",title:"BT-119 VAT category rate",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:RateApplicablePercent"}},{id:"BT-120",title:"BT-120 VAT exemption reason text",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:ExemptionReason"}},{id:"BT-121",title:"BT-121 VAT exemption reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:ExemptionReasonCode"}}]},{id:"BG-24",title:"BG-24 ADDITIONAL SUPPORTING DOCUMENTS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument"},children:[{id:"BT-122",title:"BT-122 Supporting document reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-123",title:"BT-123 Supporting document description",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:Name"}},{id:"BT-124",title:"BT-124 External document location",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:URIID"}},{id:"BT-125",title:"BT-125 Attached document",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject"},children:[{id:"BT-125-1",title:"BT-125-1 Attached document Mime code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject/@mimeCode"}},{id:"BT-125-2",title:"BT-125-2 Attached document Filename",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject/@filename"}}]}]},{id:"BG-25",title:"BG-25 INVOICE LINE",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem"},children:[{id:"BT-126",title:"BT-126 Invoice line identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument/ram:LineID"}},{id:"BT-127",title:"BT-127 Invoice line note",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument/ram:IncludedNote/ram:Content"}},{id:"BT-128",title:"BT-128 Invoice line object identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID"},children:[{id:"BT-128-1",title:"BT-128-1 Invoice line object identifier identification",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:AdditionalReferencedDocument/ram:ReferenceTypeCode"}}]},{id:"BT-129",title:"BT-129 Invoiced quantity",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity"}},{id:"BT-130",title:"BT-130 Invoiced quantity unit of measure",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode"}},{id:"BT-131",title:"BT-131 Invoice line net amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount"}},{id:"BT-132",title:"BT-132 Referenced purchase order line reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:BuyerOrderReferencedDocument/ram:LineID"}},{id:"BT-133",title:"BT-133 Invoice line Buyer accounting reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ReceivableSpecifiedTradeAccountingAccount/ram:ID"}},{id:"BG-26",title:"BG-26 INVOICE LINE PERIOD",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod"},children:[{id:"BT-134",title:"BT-134 Invoice line period start date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod/ram:StartDateTime/udt:DateTimeString"}},{id:"BT-135",title:"BT-135 Invoice line period end date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod/ram:EndDateTime/udt:DateTimeString"}}]},{id:"BG-27",title:"BG-27 INVOICE LINE ALLOW-ANCES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge"},children:[{id:"BT-136",title:"BT-136 Invoice line allowance amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-137",title:"BT-137 Invoice line allowance base amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"}},{id:"BT-138",title:"BT-138 Invoice line allowance percentage",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"}},{id:"BT-139",title:"BT-139 Invoice line allowance reason",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"}},{id:"BT-140",title:"BT-140 Invoice line allowance reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"}}]},{id:"BG-28",title:"BG-28 INVOICE LINE CHARGES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge"},children:[{id:"BT-141",title:"BT-141 Invoice line charge amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-142",title:"BT-142 Invoice line charge base amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"}},{id:"BT-143",title:"BT-143 Invoice line charge percentage",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"}},{id:"BT-144",title:"BT-144 Invoice line charge reason",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"}},{id:"BT-145",title:"BT-145 Invoice line charge reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"}}]},{id:"BG-29",title:"BG-29 PRICE DETAILS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement"},children:[{id:"BT-146",title:"BT-146 Item net price",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount"}},{id:"BT-147",title:"BT-147 Item price discount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-148",title:"BT-148 Item gross price",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:ChargeAmount"}},{id:"BT-149",title:"BT-149 Item price base quantity",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:BasisQuantity"}},{id:"BT-150",title:"BT-150 Item price base quantity unit of measure code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:BasisQuantity/@unitCode"}}]},{id:"BG-30",title:"BG-30 LINE VAT INFORMA-TION",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax"},children:[{id:"BT-151",title:"BT-151 Invoiced item VAT category code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:TypeCode"}},{id:"BT-152",title:"BT-152 Invoiced item VAT rate",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:RateApplicablePercent"}}]},{id:"BG-31",title:"BG-31 ITEM INFORMA-TION",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct"},children:[{id:"BT-153",title:"BT-153 Item name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:Name"}},{id:"BT-154",title:"BT-154 Item description",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:Description"}},{id:"BT-155",title:"BT-155 Item Seller's identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:SellerAssignedID"}},{id:"BT-156",title:"BT-156 Item Buyer's identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:BuyerAssignedID"}},{id:"BT-157",title:"BT-157 Item standard identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:GlobalID"},children:[{id:"BT-157-1",title:"BT-157-1 Item standard identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:GlobalID/@schemeID"}}]},{id:"BT-158",title:"BT-158 Item classification identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode"},children:[{id:"BT-158-1",title:"BT-158-1 Item classification identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode/@listID"}},{id:"BT-158-2",title:"BT-158-2 Scheme version identifer",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode/@listVersionID"}}]},{id:"BT-159",title:"BT-159 Item country of origin",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:OriginTradeCountry/ram:ID"}},{id:"BG-32",title:"BG-32 ITEM ATTRIBUTES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic"},children:[{id:"BT-160",title:"BT-160 Item attribute name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic/ram:Description"}},{id:"BT-161",title:"BT-161 Item attribute value",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic/ram:Value"}}]}]}]}]};function ke(r){return r.replace(/\/@[^/]+$/,"")}function fe(r=Se){const a=(i,t)=>{const d={key:t,id:i.id,title:i.title,xpaths:i.xpaths};return i.children?.length&&(d.children=i.children.map((c,m)=>a(c,`${t}.${c.id}:${m}`))),d};return a(r,"EN16931:0")}function Be(r,a){const i=[],t=d=>{const c=d.xpaths?.[a];c&&i.push({key:d.key,id:d.id,xpath:c,cursorXpath:ke(c)}),d.children?.forEach(t)};return t(r),i}function Ne(r){const{root:a}=r;return T.jsx("div",{children:T.jsx(Ae,{node:a,depth:0,...r})})}function Ae(r){const{node:a,depth:i,expanded:t,selectedKey:d,onClickNode:c,getNodeXpath:m,getMatchCount:p}=r,y=!!a.children?.length,b=t[a.key]??!1,D=d===a.key,k=m(a),B=p(a);return T.jsxs("div",{children:[T.jsxs("div",{role:"button",tabIndex:0,"data-tree-key":a.key,onClick:()=>c(a),onKeyDown:v=>v.key==="Enter"&&c(a),style:{color:"black",display:"flex",alignItems:"center",gap:8,padding:"6px 8px",paddingLeft:i*12+8,borderRadius:6,cursor:"pointer",background:D?"rgba(0,0,0,0.06)":"transparent",userSelect:"none"},title:k||a.key,children:[T.jsx("span",{style:{width:16,display:"inline-block",textAlign:"center"},children:y?b?"▾":"▸":"•"}),T.jsx("span",{style:{fontFamily:"monospace",fontSize:12,opacity:.85},children:a.id}),T.jsx("span",{style:{fontSize:13},children:a.title}),k&&T.jsx(T.Fragment,{children:typeof B=="number"&&T.jsx("span",{style:{marginLeft:"auto",fontSize:11,fontFamily:"monospace",color:B===0?"#b91c1c":"#1f2937",background:B===0?"#fee2e2":"#e5e7eb",borderRadius:999,padding:"1px 7px"},children:B})})]}),y&&b&&T.jsx("div",{children:a.children.map(v=>T.jsx(Ae,{...r,node:v,depth:i+1},v.key))})]})}function Oe(){return typeof window<"u"&&window.localStorage.getItem("xmlExplorerDebug")==="1"}function Me(r){const{xmlText:a,syntax:i,mappings:t}=r,d=l.useRef(null),c=l.useRef(0),m=l.useRef(0),p=l.useRef(new Map),y=l.useRef(new Map),b=l.useRef(null),D=l.useRef(null),k=l.useRef("idle"),[B,v]=l.useState("idle"),[j,G]=l.useState(null),[$,Q]=l.useState({}),[Y,N]=l.useState(null),[Z,V]=l.useState(null),[ee,M]=l.useState(null);l.useEffect(()=>{k.current=B},[B]);const ne=l.useMemo(()=>t.map(S=>`${S.key}|${S.xpath}`).join("||"),[t]);l.useEffect(()=>{const S=new Worker(new URL("/assets/xmlExplorer.worker-CHTIePgi.js",typeof document>"u"?require("url").pathToFileURL(__filename).href:le&&le.tagName.toUpperCase()==="SCRIPT"&&le.src||new URL("index.cjs",document.baseURI).href),{type:"module"});return d.current=S,S.onmessage=h=>{const o=h.data;if(o.xmlVersion===c.current)switch(o.type){case"INIT_PROGRESS":v("indexing");return;case"INIT_READY":v("ready"),N(I=>I?.total?I:null);return;case"COUNT_BATCH":Q(I=>{const P={...I};for(const L of o.entries)P[L.key]=L.count;return P}),N({done:o.done,total:o.total}),o.done>=o.total&&N(null);return;case"CURSOR_RESULT":if(o.requestId!==m.current)return;Oe()&&console.debug("[xml-explorer] cursor-result",{requestId:o.requestId,key:o.key,debug:o.debug}),V(o.key),M(o.debug??null);return;case"MATCH_RESULT":{const I=p.current.get(o.requestId);I&&(p.current.delete(o.requestId),I.resolve({total:o.total,matches:o.matches}));return}case"COUNT_RESULT":{const I=y.current.get(o.requestId);I&&(y.current.delete(o.requestId),I.resolve(o.count));return}case"ERROR":if(v("error"),G(o.message),typeof o.requestId=="number"){const I=p.current.get(o.requestId);I&&(p.current.delete(o.requestId),I.reject(new Error(o.message)));const P=y.current.get(o.requestId);P&&(y.current.delete(o.requestId),P.reject(new Error(o.message)))}}},()=>{S.terminate(),d.current=null,p.current.forEach(h=>h.reject(new Error("Worker terminated"))),p.current.clear(),y.current.forEach(h=>h.reject(new Error("Worker terminated"))),y.current.clear()}},[]),l.useEffect(()=>{c.current+=1;const S=c.current;m.current=0,V(null),G(null),v("indexing"),Q({}),N(t.length?{done:0,total:t.length}:null),M(null),p.current.forEach(o=>o.reject(new Error("Canceled due to new XML version"))),p.current.clear(),y.current.forEach(o=>o.reject(new Error("Canceled due to new XML version"))),y.current.clear();const h={type:"INIT",xmlVersion:S,xmlText:a,syntax:i,mappings:t};d.current?.postMessage(h)},[a,i,ne,t]);const O=l.useCallback((S,h)=>{if(k.current!=="ready"||b.current===S&&D.current===h)return;b.current=S,D.current=h;const o=++m.current,I={type:"CURSOR_LOOKUP",xmlVersion:c.current,requestId:o,line:S,column:h};d.current?.postMessage(I)},[]),X=l.useCallback((S,h,o=1,I)=>new Promise((P,L)=>{const F=++m.current,_={type:"GET_MATCHES",xmlVersion:c.current,requestId:F,nodeKey:S,offset:h,limit:o,context:I};p.current.set(F,{resolve:P,reject:L}),d.current?.postMessage(_)}),[]),U=l.useCallback((S,h)=>new Promise((o,I)=>{const P=++m.current,L={type:"GET_COUNT",xmlVersion:c.current,requestId:P,nodeKey:S,context:h};y.current.set(P,{resolve:o,reject:I}),d.current?.postMessage(L)}),[]);return{workerState:B,error:j,countByKey:$,countProgress:Y,cursorMatchKey:Z,cursorLookupDebug:ee,lookupCursor:O,requestMatches:X,requestCount:U}}const _e=120,xe=500;function he(){return typeof window<"u"&&window.localStorage.getItem("xmlExplorerDebug")==="1"}function je({xml:r,syntax:a="cii"}){const i=l.useRef(null),t=l.useRef([]),d=l.useRef(null),c=l.useRef(new Set),m=l.useRef("idle"),p=l.useRef(!1),y=l.useRef(null),b=l.useRef(null),D=l.useRef(null),[k,B]=l.useState(""),[v,j]=l.useState("nearest"),[G,$]=l.useState(null),[Q,Y]=l.useState({}),[N,Z]=l.useState({}),[V,ee]=l.useState({});l.useEffect(()=>{Y({}),$(null),ee({}),c.current.clear()},[r]);const M=l.useMemo(()=>fe(),[]),ne=l.useMemo(()=>Be(M,a),[M,a]),{workerState:O,error:X,countByKey:U,countProgress:S,cursorMatchKey:h,cursorLookupDebug:o,lookupCursor:I,requestMatches:P,requestCount:L}=Me({xmlText:r,syntax:a,mappings:ne});l.useEffect(()=>{m.current=O},[O]),l.useEffect(()=>{const n=f=>{f.key==="Control"&&(p.current=!0)},s=f=>{f.key==="Control"&&(p.current=!1)},A=()=>{p.current=!1};return window.addEventListener("keydown",n),window.addEventListener("keyup",s),window.addEventListener("blur",A),()=>{window.removeEventListener("keydown",n),window.removeEventListener("keyup",s),window.removeEventListener("blur",A)}},[]),l.useEffect(()=>{X&&B(X)},[X]);const F=n=>n.xpaths?.[a],_=l.useMemo(()=>{const n=s=>{const A=s.children??[],f=te(s.key),R=f.length>0?V[s.key]:void 0,H=typeof R=="number"?R:f.length>0?void 0:U[ce(s.key)]??0;if(typeof H=="number"&&H>1&&A.length>0&&N[s.key]){const E=Math.min(H,xe);return{...s,children:Array.from({length:E},(w,g)=>{const W=g+1,z=`${s.key}::${W}`;return{key:z,id:s.id,title:`${s.title} [${W}]`,xpaths:s.xpaths,isOccurrence:!0,children:A.map((q,ae)=>{const K=Ie(z,q.id,ae);return n({...q,key:K})})}})}}return{...s,children:A.map((E,w)=>n({...E,key:Ie(s.key,E.id,w)}))}};return n(M)},[M,U,V,N]),ie=l.useMemo(()=>Ue(_,N),[_,N]);l.useEffect(()=>{D.current=_},[_]),l.useEffect(()=>{G&&requestAnimationFrame(()=>{ve(y.current,G)})},[G,_,N]),l.useEffect(()=>{if(!h)return;const n=`${h}|${o?.bestLine??""}|${o?.bestColumn??""}`;if(b.current===n)return;b.current=n;let s=!1;return(async()=>{const f=o?.bestLine,R=o?.bestColumn,H=Ye(o),E=Ce(o?.absolutePath),w=Ce(o?.matchedCursorXpath);if(!H&&v==="strict"){e(),B(`No exact BT/BG for ${E}. Strict mode blocks fallback${w?` (nearest: ${w})`:""}.`);return}let g=h;if(typeof f=="number"&&typeof R=="number"&&(g=await Xe(h,f,R,M,L,P)),he()&&console.debug("[xml-explorer] editor->tree sync",{cursorMatchKey:h,resolvedKey:g,depth:te(g).length,cursor:{line:f,column:R}}),s)return;e(),$(K=>K===g?K:g),Ge(g,Z);const z=(D.current?me(D.current,g):null)?.title??g,q=ce(g),ae=te(g);try{const K=ae.length>0?10:Math.min(50,U[q]??1),J=await P(q,0,Math.max(1,K),ae),ue=typeof f=="number"&&typeof R=="number"?J.matches[ge(J.matches,f,R)]:J.matches[0];if(!ue||s)return;C(ue,z,0,J.total),H||B(`No exact BT/BG for ${E}. Mapped to nearest: ${w}.`),Y(be=>({...be,[g]:0}))}catch{}})(),()=>{s=!0}},[h,o,M,P,L,U,v]),l.useEffect(()=>{if(O==="ready")for(const n of ie)typeof V[n.key]!="number"&&(c.current.has(n.key)||(c.current.add(n.key),L(n.baseKey,n.context).then(s=>{ee(A=>({...A,[n.key]:s}))}).catch(()=>{}).finally(()=>{c.current.delete(n.key)})))},[O,ie,V,L]);function e(){const n=i.current,s=n?.getModel();!n||!s||(t.current=n.deltaDecorations(t.current,[]))}function u(n){Z(s=>({...s,[n]:!s[n]}))}function C(n,s,A,f){const R=i.current,H=R?.getModel();if(!R||!H)return;const E=Math.min(Math.max(1,n.line),H.getLineCount()),w=H.getLineMaxColumn(E),g=Math.min(Math.max(1,n.column),w),W=n.endLine??E,z=Math.min(Math.max(E,W),H.getLineCount()),q=H.getLineMaxColumn(z),ae=n.endColumn??q,K=Math.min(Math.max(1,ae),q),J=new Ee.Range(E,g,z,K);R.revealRangeInCenter(J),t.current=R.deltaDecorations(t.current,[{range:J,options:{inlineClassName:"xml-xpath-highlight"}}]),B(f>1?`Highlighted ${s}: ${A+1}/${f}`:`Highlighted ${s}`)}async function x(n){$(n.key);const s=ce(n.key),A=te(n.key),f=n.isOccurrence?1:A.length?void 0:U[s]??0,R=F(n);if(!R){e();return}if(f===0)B(`${n.id}: no match found in XML. (${R})`),e();else{const H=Q[n.key]??-1,E=n.isOccurrence?0:G===n.key&&typeof f=="number"&&f>1?(H+1)%f:0;try{const w=await P(s,E,1,A),g=w.matches[0];g?(C(g,n.title,n.isOccurrence?0:E,w.total),Y(W=>({...W,[n.key]:n.isOccurrence?0:E}))):(B(`${n.id}: no match found in XML.`),e())}catch(w){const g=w instanceof Error?w.message:"Failed to resolve match";B(g)}}n.children?.length&&u(n.key)}function re(n){if(m.current!=="ready"||!p.current)return;d.current!=null&&window.clearTimeout(d.current);const s=n.position;he()&&console.debug("[xml-explorer] cursor-change",{line:s.lineNumber,column:s.column}),d.current=window.setTimeout(()=>{I(s.lineNumber,s.column)},_e)}return T.jsxs("div",{style:{height:"100%",maxHeight:"100%",minHeight:0,overflow:"hidden",boxSizing:"border-box",display:"flex",flexDirection:"column",width:"100%"},children:[T.jsxs("div",{style:{padding:10,borderBottom:"1px solid #ddd",display:"flex",gap:12,alignItems:"center",fontFamily:"system-ui, sans-serif",flexShrink:0,minWidth:0},children:[T.jsx("button",{onClick:e,style:{padding:"6px 10px"},children:"Clear highlight"}),T.jsxs("button",{onClick:()=>j(n=>n==="nearest"?"strict":"nearest"),style:{padding:"6px 10px"},title:"Toggle mapping mode for XML clicks",children:["Mode: ",v==="nearest"?"Nearest fallback":"Strict exact"]}),T.jsxs("span",{style:{color:"#374151",fontSize:12},children:["Worker:"," ",O==="indexing"?"indexing XML...":O==="ready"?"ready":O]}),T.jsxs("span",{style:{color:"#374151",fontSize:12},children:["Counts:"," ",S?`${S.done}/${S.total}`:"ready"]}),T.jsx("span",{style:{fontFamily:"monospace",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:k,children:k})]}),T.jsxs("div",{style:{flex:1,minHeight:0,overflow:"hidden",display:"grid",gridTemplateColumns:"1fr 360px",width:"100%"},children:[T.jsx("div",{style:{minWidth:0,minHeight:0,width:"100%"},children:T.jsx(Pe,{height:"100%",defaultLanguage:"xml",value:r,onMount:n=>{i.current=n,n.onDidChangeCursorPosition(re)},options:{minimap:{enabled:!1},fontSize:13,wordWrap:"on",scrollBeyondLastLine:!1,automaticLayout:!0}})}),T.jsxs("div",{style:{borderLeft:"1px solid #ddd",padding:10,overflow:"hidden",minHeight:0,display:"flex",flexDirection:"column",fontFamily:"system-ui, sans-serif",background:"#fafafa"},children:[T.jsx("div",{style:{fontWeight:600,marginBottom:8,flexShrink:0},children:"BT / BG (EN16931)"}),T.jsx("div",{ref:y,style:{flex:1,minHeight:0,overflow:"auto"},children:T.jsx(Ne,{root:_,expanded:N,selectedKey:G,onToggle:u,onClickNode:x,getNodeXpath:F,getMatchCount:n=>{if(n.isOccurrence)return 1;const s=V[n.key];if(typeof s=="number")return s;if(te(n.key).length>0)return;const A=ce(n.key);return U[A]}})}),T.jsx("div",{style:{marginTop:10,fontSize:12,color:"#444"},children:"Cursor sync and count calculation run in a worker thread."})]})]}),T.jsx("style",{children:`
|
|
6
|
+
<%s key={someKey} {...props} />`,v,s,C,s),ae[s+v]=!0)}if(s=null,g!==void 0&&(i(g),s=""+g),d(p)&&(i(p.key),s=""+p.key),"key"in p){g={};for(var E in p)E!=="key"&&(g[E]=p[E])}else g=p;return s&&m(g,typeof e=="function"?e.displayName||e.name||"Unknown":e),b(e,s,g,o(),te,a)}function _(e){I(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===M&&(e._payload.status==="fulfilled"?I(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function I(e){return typeof e=="object"&&e!==null&&e.$$typeof===k}var A=l,k=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),Z=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),G=Symbol.for("react.client.reference"),S=A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=Object.prototype.hasOwnProperty,u=Array.isArray,y=console.createTask?console.createTask:function(){return null};A={react_stack_bottom_frame:function(e){return e()}};var x,B={},q=A.react_stack_bottom_frame.bind(A,c)(),H=y(n(c)),ae={};oe.Fragment=j,oe.jsx=function(e,p,g){var v=1e4>S.recentlyCreatedOwnerStacks++;return D(e,p,g,!1,v?Error("react-stack-top-frame"):q,v?y(n(e)):H)},oe.jsxs=function(e,p,g){var v=1e4>S.recentlyCreatedOwnerStacks++;return D(e,p,g,!0,v?Error("react-stack-top-frame"):q,v?y(n(e)):H)}})()),oe}var he;function _e(){return he||(he=1,process.env.NODE_ENV==="production"?ue.exports=Oe():ue.exports=Pe()),ue.exports}var h=_e();const Se={id:"EN16931",title:"EN16931 Business Terms",xpaths:{ubl:"/ubl:Invoice",cii:"/rsm:CrossIndustryInvoice"},children:[{id:"BT-1",title:"BT-1 Invoice number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:ID"}},{id:"BT-2",title:"BT-2 Invoice issue date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString"}},{id:"BT-3",title:"BT-3 Invoice type code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:TypeCode"}},{id:"BT-5",title:"BT-5 Invoice currency code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode"}},{id:"BT-6",title:"BT-6 VAT accounting currency code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode"}},{id:"BT-7",title:"BT-7 Value added tax point date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:TaxPointDate/udt:DateString"}},{id:"BT-8",title:"BT-8 Value added tax point date code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:DueDateTypeCode"}},{id:"BT-9",title:"BT-9 Payment due date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:DueDateDateTime/udt:DateTimeString"}},{id:"BT-10",title:"BT-10 Buyer reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerReference"}},{id:"BT-11",title:"BT-11 Project reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SpecifiedProcuringProject/ram:ID"}},{id:"BT-12",title:"BT-12 Contract reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:ContractReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-13",title:"BT-13 Purchase order reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerOrderReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-14",title:"BT-14 Sales order reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerOrderReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-15",title:"BT-15 Receiving advice reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ReceivingAdviceReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-16",title:"BT-16 Despatch advice reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:DespatchAdviceReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-17",title:"BT-17 Tender or lot reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-18",title:"BT-18 Invoiced object identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID"},children:[{id:"BT-18-1",title:"BT-18-1 Scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:ReferenceTypeCode"}}]},{id:"BT-19",title:"BT-19 Buyer accounting reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ReceivableSpecifiedTradeAccountingAccount/ram:ID"}},{id:"BT-20",title:"BT-20 Payment terms",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:Description"}},{id:"BG-1",title:"BG-1 INVOICE NOTE",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote"},children:[{id:"BT-21",title:"BT-21 Invoice note subject code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote/ram:SubjectCode"}},{id:"BT-22",title:"BT-22 Invoice note",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote/ram:Content"}}]},{id:"BG-2",title:"BG-2 PROCESS CONTROL",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext"},children:[{id:"BT-23",title:"BT-23 Business process type",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram: BusinessProcessSpecifiedDocumentContextParameter/ram:ID"}},{id:"BT-24",title:"BT-24 Specification identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID"}}]},{id:"BG-3",title:"BG-3 PRECEDING INVOICE REFERENCE",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument"},children:[{id:"BT-25",title:"BT-25 Preceding Invoice number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-26",title:"BT-26 Preceding Invoice issue date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument/ram:FormattedIssueDateTime/qdt:DateTimeString"}}]},{id:"BG-5",title:"BG-5 SELLER",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty"},children:[{id:"BT-35",title:"BT-35 Seller address line 1",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:LineOne"}},{id:"BT-36",title:"BT-36 Seller address line 2",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:LineTwo"}},{id:"BT-162",title:"BT-162 Seller address line 3",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:LineThree"}},{id:"BT-37",title:"BT-37 Seller city",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CityName"}},{id:"BT-38",title:"BT-38 Seller post code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"}},{id:"BT-39",title:"BT-39 Seller country subdivision",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"}},{id:"BT-40",title:"BT-40 Seller country code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID"}},{id:"BG-6",title:"BG-6 SELLER CONTACT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact"},children:[{id:"BT-41",title:"BT-41 Seller contact point",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact/ram:PersonName"}},{id:"BT-42",title:"BT-42 Seller contact telephone number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact/ram:TelephoneUniversalCommunication/ram:CompleteNumber"}},{id:"BT-43",title:"BT-43 Seller contact email address",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact/ram:EmailURIUniversalCommunication/ram:URIID"}}]}]},{id:"BG-7",title:"BG-7 BUYER",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty"},children:[{id:"BT-44",title:"BT-44 Buyer name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:Name"}},{id:"BT-45",title:"BT-45 Buyer trading name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:TradingBusinessName"}},{id:"BT-46",title:"BT-46 Buyer identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:ID"},children:[{id:"BT-46-1",title:"BT-46-1 Buyer identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:GlobalID/@schemeID"}}]},{id:"BT-47",title:"BT-47 Buyer legal registration identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID"},children:[{id:"BT-47-1",title:"BT-47-1 Buyer legal registration identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID/@schemeID"}}]},{id:"BT-48",title:"BT-48 Buyer VAT identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID"}},{id:"BT-49",title:"BT-49 Buyer electronic address",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication/ram:URIID"},children:[{id:"BT-49-1",title:"BT-49-1 Buyer electronic address identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication/ram:URIID/@schemeID"}}]},{id:"BG-8",title:"BG-8 BUYER POSTAL ADDRESS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress"},children:[{id:"BT-50",title:"BT-50 Buyer address line 1",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:LineOne"}},{id:"BT-51",title:"BT-51 Buyer address line 2",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:LineTwo"}},{id:"BT-163",title:"BT-163 Buyer address line 3",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:LineThree"}},{id:"BT-52",title:"BT-52 Buyer city",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CityName"}},{id:"BT-53",title:"BT-53 Buyer post code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"}},{id:"BT-54",title:"BT-54 Buyer country subdivision",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"}},{id:"BT-55",title:"BT-55 Buyer country code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountryID"}}]},{id:"BG-9",title:"BG-9 BUYER CONTACT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact"},children:[{id:"BT-56",title:"BT-56 Buyer contact point",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact/ram:PersonName"}},{id:"BT-57",title:"BT-57 Buyer contact telephone number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact/ram:TelephoneUniversalCommunication/ram:CompleteNumber"}},{id:"BT-58",title:"BT-58 Buyer contact email address",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact/ram:EmailURIUniversalCommunication/ram:URIID"}}]}]},{id:"BG-10",title:"BG-10 PAYEE",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty"},children:[{id:"BT-59",title:"BT-59 Payee name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:Name"}},{id:"BT-60",title:"BT-60 Payee identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:ID"},children:[{id:"BT-60-1",title:"BT-60-1 Payee identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:GlobalID/@schemeID"}}]},{id:"BT-61",title:"BT-61 Payee legal registration identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:ID"},children:[{id:"BT-61-1",title:"BT-61-1 Payee legal registration identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:ID/@schemeID"}}]}]},{id:"BG-11",title:"BG-11 SELLER TAX REPRESENTATIVE PARTY",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty"},children:[{id:"BT-62",title:"BT-62 Seller tax representa-tive name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:Name"}},{id:"BT-63",title:"BT-63 Seller tax representa-tive VAT identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID"}},{id:"BG-12",title:"BG-12 SELLER TAX REPRESENTATIVE POSTAL ADDRESS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress"},children:[{id:"BT-64",title:"BT-64 Tax representa-tive address line 1",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:LineOne"}},{id:"BT-65",title:"BT-65 Tax representa-tive address line 2",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:LineTwo"}},{id:"BT-164",title:"BT-164 Tax representative address line 3",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:LineThree"}},{id:"BT-66",title:"BT-66 Tax representa-tive city",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CityName"}},{id:"BT-67",title:"BT-67 Tax representa-tive post code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"}},{id:"BT-68",title:"BT-68 Tax representa-tive country subdivision",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"}},{id:"BT-69",title:"BT-69 Tax representa-tive country code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CountryID"}}]}]},{id:"BG-13",title:"BG-13 DELIVERY INFORMATION",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty"},children:[{id:"BT-70",title:"BT-70 Deliver to party name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:Name"}},{id:"BT-71",title:"BT-71 Deliver to location identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:ID"},children:[{id:"BT-71-1",title:"BT-71-1 Deliver to location identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:GlobalID/@schemeID"}}]},{id:"BT-72",title:"BT-72 Actual delivery date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ActualDeliverySupplyChainEvent/ram:OccurrenceDateTime/udt:DateTimeString"}},{id:"BG-14",title:"BG-14 DELIVERY OR INVOICE PERIOD",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod"},children:[{id:"BT-73",title:"BT-73 Invoicing period start date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod/ram:StartDateTime/udt:DateTimeString"}},{id:"BT-74",title:"BT-74 Invoicing period end date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod/ram:EndDateTime/udt:DateTimeString"}}]},{id:"BG-15",title:"BG-15 DELIVER TO ADDRESS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress"},children:[{id:"BT-75",title:"BT-75 Deliver to address line 1",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:LineOne"}},{id:"BT-76",title:"BT-76 Deliver to address line 2",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:LineTwo"}},{id:"BT-165",title:"BT-165 Deliver to address line 3",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:LineThree"}},{id:"BT-77",title:"BT-77 Deliver to city",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CityName"}},{id:"BT-78",title:"BT-78 Deliver to post code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"}},{id:"BT-79",title:"BT-79 Deliver to country subdivision",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"}},{id:"BT-80",title:"BT-80 Deliver to country code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID"}}]}]},{id:"BG-16",title:"BG-16 PAYMENT INSTRUC-TIONS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans"},children:[{id:"BT-81",title:"BT-81 Payment means type code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:TypeCode"}},{id:"BT-82",title:"BT-82 Payment means text",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:Information"}},{id:"BT-83",title:"BT-83 Remittance information",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PaymentReference"}},{id:"BG-17",title:"BG-17 CREDIT TRANSFER",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount"},children:[{id:"BT-84",title:"BT-84 Payment account identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount/ram:IBANID"}},{id:"BT-85",title:"BT-85 Payment account name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount/ram:AccountName"}},{id:"BT-86",title:"BT-86 Payment service provider identifier"}]},{id:"BG-18",title:"BG-18 PAYMENT CARD INFORMA-TION",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard"},children:[{id:"BT-87",title:"BT-87 Payment card primary account number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard/ram:ID"}},{id:"BT-88",title:"BT-88 Payment card holder name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard/ram:CardholderName"}}]},{id:"BG-19",title:"BG-19 DIRECT DEBIT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement"},children:[{id:"BT-89",title:"BT-89 Mandate reference identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:DirectDebitMandateID"}},{id:"BT-90",title:"BT-90 Bank assigned creditor identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:CreditorReferenceID"}},{id:"BT-91",title:"BT-91 Debited account identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayerPartyDebtorFinancialAccount/ram:IBANID"}}]}]},{id:"BG-20",title:"BG-20 DOCUMENT LEVEL ALLOW-ANCES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge"},children:[{id:"BT-92",title:"BT-92 Document level allowance amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-93",title:"BT-93 Document level allowance base amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"}},{id:"BT-94",title:"BT-94 Document level allowance percentage",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"}},{id:"BT-95",title:"BT-95 Document level allowance VAT category code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:TypeCode"}},{id:"BT-96",title:"BT-96 Document level allowance VAT rate",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:RateApplicablePercent"}},{id:"BT-97",title:"BT-97 Document level allowance reason",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"}},{id:"BT-98",title:"BT-98 Document level allowance reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"}}]},{id:"BG-21",title:"BG-21 DOCUMENT LEVEL CHARGES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge"},children:[{id:"BT-99",title:"BT-99 Document level charge amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-100",title:"BT-100 Document level charge base amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"}},{id:"BT-101",title:"BT-101 Document level charge percentage",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"}},{id:"BT-102",title:"BT-102 Document level charge VAT category code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:TypeCode"}},{id:"BT-103",title:"BT-103 Document level charge VAT rate",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:RateApplicablePercent"}},{id:"BT-104",title:"BT-104 Document level charge reason",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"}},{id:"BT-105",title:"BT-105 Document level charge reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"}}]},{id:"BG-22",title:"BG-22 DOCUMENT TOTALS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation"},children:[{id:"BT-106",title:"BT-106 Sum of Invoice line net amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:LineTotalAmount"}},{id:"BT-107",title:"BT-107 Sum of allowances on document level",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:AllowanceTotalAmount"}},{id:"BT-108",title:"BT-108 Sum of charges on document level",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount"}},{id:"BT-109",title:"BT-109 Invoice total amount without VAT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxBasisTotalAmount"}},{id:"BT-110",title:"BT-110 Invoice total VAT amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount"}},{id:"BT-111",title:"BT-111 Invoice total VAT amount in accounting currency",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount"}},{id:"BT-112",title:"BT-112 Invoice total amount with VAT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:GrandTotalAmount"}},{id:"BT-113",title:"BT-113 Paid amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TotalPrepaidAmount"}},{id:"BT-114",title:"BT-114 Rounding amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:RoundingAmount"}},{id:"BT-115",title:"BT-115 Amount due for payment",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:DuePayableAmount"}}]},{id:"BG-23",title:"BG-23 VAT BREAK-DOWN",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax"},children:[{id:"BT-116",title:"BT-116 VAT category taxable amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:BasisAmount"}},{id:"BT-117",title:"BT-117 VAT category tax amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CalculatedAmount"}},{id:"BT-118",title:"BT-118 VAT category code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:TypeCode"}},{id:"BT-119",title:"BT-119 VAT category rate",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:RateApplicablePercent"}},{id:"BT-120",title:"BT-120 VAT exemption reason text",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:ExemptionReason"}},{id:"BT-121",title:"BT-121 VAT exemption reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:ExemptionReasonCode"}}]},{id:"BG-24",title:"BG-24 ADDITIONAL SUPPORTING DOCUMENTS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument"},children:[{id:"BT-122",title:"BT-122 Supporting document reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-123",title:"BT-123 Supporting document description",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:Name"}},{id:"BT-124",title:"BT-124 External document location",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:URIID"}},{id:"BT-125",title:"BT-125 Attached document",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject"},children:[{id:"BT-125-1",title:"BT-125-1 Attached document Mime code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject/@mimeCode"}},{id:"BT-125-2",title:"BT-125-2 Attached document Filename",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject/@filename"}}]}]},{id:"BG-25",title:"BG-25 INVOICE LINE",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem"},children:[{id:"BT-126",title:"BT-126 Invoice line identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument/ram:LineID"}},{id:"BT-127",title:"BT-127 Invoice line note",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument/ram:IncludedNote/ram:Content"}},{id:"BT-128",title:"BT-128 Invoice line object identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID"},children:[{id:"BT-128-1",title:"BT-128-1 Invoice line object identifier identification",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:AdditionalReferencedDocument/ram:ReferenceTypeCode"}}]},{id:"BT-129",title:"BT-129 Invoiced quantity",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity"}},{id:"BT-130",title:"BT-130 Invoiced quantity unit of measure",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode"}},{id:"BT-131",title:"BT-131 Invoice line net amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount"}},{id:"BT-132",title:"BT-132 Referenced purchase order line reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:BuyerOrderReferencedDocument/ram:LineID"}},{id:"BT-133",title:"BT-133 Invoice line Buyer accounting reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ReceivableSpecifiedTradeAccountingAccount/ram:ID"}},{id:"BG-26",title:"BG-26 INVOICE LINE PERIOD",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod"},children:[{id:"BT-134",title:"BT-134 Invoice line period start date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod/ram:StartDateTime/udt:DateTimeString"}},{id:"BT-135",title:"BT-135 Invoice line period end date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod/ram:EndDateTime/udt:DateTimeString"}}]},{id:"BG-27",title:"BG-27 INVOICE LINE ALLOW-ANCES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge"},children:[{id:"BT-136",title:"BT-136 Invoice line allowance amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-137",title:"BT-137 Invoice line allowance base amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"}},{id:"BT-138",title:"BT-138 Invoice line allowance percentage",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"}},{id:"BT-139",title:"BT-139 Invoice line allowance reason",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"}},{id:"BT-140",title:"BT-140 Invoice line allowance reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"}}]},{id:"BG-28",title:"BG-28 INVOICE LINE CHARGES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge"},children:[{id:"BT-141",title:"BT-141 Invoice line charge amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-142",title:"BT-142 Invoice line charge base amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"}},{id:"BT-143",title:"BT-143 Invoice line charge percentage",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"}},{id:"BT-144",title:"BT-144 Invoice line charge reason",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"}},{id:"BT-145",title:"BT-145 Invoice line charge reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"}}]},{id:"BG-29",title:"BG-29 PRICE DETAILS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement"},children:[{id:"BT-146",title:"BT-146 Item net price",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount"}},{id:"BT-147",title:"BT-147 Item price discount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-148",title:"BT-148 Item gross price",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:ChargeAmount"}},{id:"BT-149",title:"BT-149 Item price base quantity",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:BasisQuantity"}},{id:"BT-150",title:"BT-150 Item price base quantity unit of measure code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:BasisQuantity/@unitCode"}}]},{id:"BG-30",title:"BG-30 LINE VAT INFORMA-TION",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax"},children:[{id:"BT-151",title:"BT-151 Invoiced item VAT category code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:TypeCode"}},{id:"BT-152",title:"BT-152 Invoiced item VAT rate",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:RateApplicablePercent"}}]},{id:"BG-31",title:"BG-31 ITEM INFORMA-TION",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct"},children:[{id:"BT-153",title:"BT-153 Item name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:Name"}},{id:"BT-154",title:"BT-154 Item description",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:Description"}},{id:"BT-155",title:"BT-155 Item Seller's identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:SellerAssignedID"}},{id:"BT-156",title:"BT-156 Item Buyer's identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:BuyerAssignedID"}},{id:"BT-157",title:"BT-157 Item standard identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:GlobalID"},children:[{id:"BT-157-1",title:"BT-157-1 Item standard identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:GlobalID/@schemeID"}}]},{id:"BT-158",title:"BT-158 Item classification identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode"},children:[{id:"BT-158-1",title:"BT-158-1 Item classification identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode/@listID"}},{id:"BT-158-2",title:"BT-158-2 Scheme version identifer",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode/@listVersionID"}}]},{id:"BT-159",title:"BT-159 Item country of origin",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:OriginTradeCountry/ram:ID"}},{id:"BG-32",title:"BG-32 ITEM ATTRIBUTES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic"},children:[{id:"BT-160",title:"BT-160 Item attribute name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic/ram:Description"}},{id:"BT-161",title:"BT-161 Item attribute value",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic/ram:Value"}}]}]}]}]};function Le(t){return t.replace(/\/@[^/]+$/,"")}function Ee(t=Se){const r=(i,n)=>{const o={key:n,id:i.id,title:i.title,xpaths:i.xpaths};return i.children?.length&&(o.children=i.children.map((c,d)=>r(c,`${n}.${c.id}:${d}`))),o};return r(t,"EN16931:0")}function Ie(t,r){const i=[],n=o=>{const c=o.xpaths?.[r];c&&i.push({key:o.key,id:o.id,xpath:c,cursorXpath:Le(c)}),o.children?.forEach(n)};return n(t),i}function Me(t){const{root:r}=t;return h.jsx("div",{children:h.jsx(Ce,{node:r,depth:0,...t})})}function Ce(t){const{node:r,depth:i,expanded:n,selectedKey:o,onClickNode:c,getNodeXpath:d,getMatchCount:m}=t,f=!!r.children?.length,b=n[r.key]??!1,D=o===r.key,_=d(r),I=m(r);return h.jsxs("div",{children:[h.jsxs("div",{role:"button",tabIndex:0,"data-tree-key":r.key,onClick:()=>c(r),onKeyDown:A=>A.key==="Enter"&&c(r),style:{color:"black",display:"flex",alignItems:"center",gap:8,padding:"6px 8px",paddingLeft:i*12+8,borderRadius:6,cursor:"pointer",background:D?"rgba(0,0,0,0.06)":"transparent",userSelect:"none"},title:_||r.key,children:[h.jsx("span",{style:{width:16,display:"inline-block",textAlign:"center"},children:f?b?"▾":"▸":"•"}),h.jsx("span",{style:{fontFamily:"monospace",fontSize:12,opacity:.85},children:r.id}),h.jsx("span",{style:{fontSize:13},children:r.title}),_&&h.jsx(h.Fragment,{children:typeof I=="number"&&h.jsx("span",{style:{marginLeft:"auto",fontSize:11,fontFamily:"monospace",color:I===0?"#b91c1c":"#1f2937",background:I===0?"#fee2e2":"#e5e7eb",borderRadius:999,padding:"1px 7px"},children:I})})]}),f&&b&&h.jsx("div",{children:r.children.map(A=>h.jsx(Ce,{...t,node:A,depth:i+1},A.key))})]})}const ve=`(function(){"use strict";var Gt={},zt={},te;function Ee(){return te||(te=1,zt.entityMap={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),zt}var Jt={},ee;function me(){if(ee)return Jt;ee=1;var h=/[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/,d=new RegExp("[\\\\-\\\\.0-9"+h.source.slice(1,-1)+"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]"),A=new RegExp("^"+h.source+d.source+"*(?::"+h.source+d.source+"*)?$"),O=0,F=1,V=2,W=3,it=4,pt=5,mt=6,at=7;function St(f,x){this.message=f,this.locator=x,Error.captureStackTrace&&Error.captureStackTrace(this,St)}St.prototype=new Error,St.prototype.name=St.name;function y(){}y.prototype={parse:function(f,x,N){var U=this.domBuilder;U.startDocument(),ft(x,x={}),$(f,x,N,U,this.errorHandler),U.endDocument()}};function $(f,x,N,U,L){function C(G){if(G>65535){G-=65536;var v=55296+(G>>10),R=56320+(G&1023);return String.fromCharCode(v,R)}else return String.fromCharCode(G)}function _(G){var v=G.slice(1,-1);return v in N?N[v]:v.charAt(0)==="#"?C(parseInt(v.substr(1).replace("x","0x"))):(L.error("entity not found:"+G),G)}function H(G){if(G>lt){var v=f.substring(lt,G).replace(/&#?\\w+;/g,_);Q&&P(lt),U.characters(v,0,G-lt),lt=G}}function P(G,v){for(;G>=k&&(v=nt.exec(f));)M=v.index,k=M+v[0].length,Q.lineNumber++;Q.columnNumber=G-M+1}for(var M=0,k=0,nt=/.*(?:\\r\\n?|\\n)|.*$/g,Q=U.locator,ut=[{currentNSMap:x}],wt={},lt=0;;){try{var z=f.indexOf("<",lt);if(z<0){if(!f.substr(lt).match(/^\\s*$/)){var vt=U.doc,xt=vt.createTextNode(f.substr(lt));vt.appendChild(xt),U.currentElement=xt}return}switch(z>lt&&H(z),f.charAt(z+1)){case"/":var c=f.indexOf(">",z+3),ot=f.substring(z+2,c),q=ut.pop();c<0?(ot=f.substring(z+2).replace(/[\\s<].*/,""),L.error("end tag name: "+ot+" is not complete:"+q.tagName),c=z+1+ot.length):ot.match(/\\s</)&&(ot=ot.replace(/[\\s<].*/,""),L.error("end tag name: "+ot+" maybe not complete"),c=z+1+ot.length);var Mt=q.localNSMap,Ft=q.tagName==ot,Ht=Ft||q.tagName&&q.tagName.toLowerCase()==ot.toLowerCase();if(Ht){if(U.endElement(q.uri,q.localName,ot),Mt)for(var Yt in Mt)U.endPrefixMapping(Yt);Ft||L.fatalError("end tag name: "+ot+" is not match the current start tagName:"+q.tagName)}else ut.push(q);c++;break;case"?":Q&&P(z),c=ht(f,z,U);break;case"!":Q&&P(z),c=Ct(f,z,U,L);break;default:Q&&P(z);var Nt=new b,At=ut[ut.length-1].currentNSMap,c=J(f,z,Nt,At,_,L),Vt=Nt.length;if(!Nt.closed&&bt(f,c,Nt.tagName,wt)&&(Nt.closed=!0,N.nbsp||L.warning("unclosed xml attribute")),Q&&Vt){for(var g=X(Q,{}),Ot=0;Ot<Vt;Ot++){var dt=Nt[Ot];P(dt.offset),dt.locator=X(Q,{})}U.locator=g,j(Nt,U,At)&&ut.push(Nt),U.locator=Q}else j(Nt,U,At)&&ut.push(Nt);Nt.uri==="http://www.w3.org/1999/xhtml"&&!Nt.closed?c=rt(f,c,Nt.tagName,_,U):c++}}catch(G){if(G instanceof St)throw G;L.error("element parse error: "+G),c=-1}c>lt?lt=c:H(Math.max(z,lt)+1)}}function X(f,x){return x.lineNumber=f.lineNumber,x.columnNumber=f.columnNumber,x}function J(f,x,N,U,L,C){function _(Q,ut,wt){Q in N.attributeNames&&C.fatalError("Attribute "+Q+" redefined"),N.addValue(Q,ut,wt)}for(var H,P,M=++x,k=O;;){var nt=f.charAt(M);switch(nt){case"=":if(k===F)H=f.slice(x,M),k=W;else if(k===V)k=W;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(k===W||k===F)if(k===F&&(C.warning('attribute value must after "="'),H=f.slice(x,M)),x=M+1,M=f.indexOf(nt,x),M>0)P=f.slice(x,M).replace(/&#?\\w+;/g,L),_(H,P,x-1),k=pt;else throw new Error("attribute value no end '"+nt+"' match");else if(k==it)P=f.slice(x,M).replace(/&#?\\w+;/g,L),_(H,P,x),C.warning('attribute "'+H+'" missed start quot('+nt+")!!"),x=M+1,k=pt;else throw new Error('attribute value must after "="');break;case"/":switch(k){case O:N.setTagName(f.slice(x,M));case pt:case mt:case at:k=at,N.closed=!0;case it:case F:case V:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return C.error("unexpected end of input"),k==O&&N.setTagName(f.slice(x,M)),M;case">":switch(k){case O:N.setTagName(f.slice(x,M));case pt:case mt:case at:break;case it:case F:P=f.slice(x,M),P.slice(-1)==="/"&&(N.closed=!0,P=P.slice(0,-1));case V:k===V&&(P=H),k==it?(C.warning('attribute "'+P+'" missed quot(")!'),_(H,P.replace(/&#?\\w+;/g,L),x)):((U[""]!=="http://www.w3.org/1999/xhtml"||!P.match(/^(?:disabled|checked|selected)$/i))&&C.warning('attribute "'+P+'" missed value!! "'+P+'" instead!!'),_(P,P,x));break;case W:throw new Error("attribute value missed!!")}return M;case"":nt=" ";default:if(nt<=" ")switch(k){case O:N.setTagName(f.slice(x,M)),k=mt;break;case F:H=f.slice(x,M),k=V;break;case it:var P=f.slice(x,M).replace(/&#?\\w+;/g,L);C.warning('attribute "'+P+'" missed quot(")!!'),_(H,P,x);case pt:k=mt;break}else switch(k){case V:N.tagName,(U[""]!=="http://www.w3.org/1999/xhtml"||!H.match(/^(?:disabled|checked|selected)$/i))&&C.warning('attribute "'+H+'" missed value!! "'+H+'" instead2!!'),_(H,H,x),x=M,k=F;break;case pt:C.warning('attribute space is required"'+H+'"!!');case mt:k=F,x=M;break;case W:k=it,x=M;break;case at:throw new Error("elements closed character '/' and '>' must be connected to")}}M++}}function j(f,x,N){for(var U=f.tagName,L=null,nt=f.length;nt--;){var C=f[nt],_=C.qName,H=C.value,Q=_.indexOf(":");if(Q>0)var P=C.prefix=_.slice(0,Q),M=_.slice(Q+1),k=P==="xmlns"&&M;else M=_,P=null,k=_==="xmlns"&&"";C.localName=M,k!==!1&&(L==null&&(L={},ft(N,N={})),N[k]=L[k]=H,C.uri="http://www.w3.org/2000/xmlns/",x.startPrefixMapping(k,H))}for(var nt=f.length;nt--;){C=f[nt];var P=C.prefix;P&&(P==="xml"&&(C.uri="http://www.w3.org/XML/1998/namespace"),P!=="xmlns"&&(C.uri=N[P||""]))}var Q=U.indexOf(":");Q>0?(P=f.prefix=U.slice(0,Q),M=f.localName=U.slice(Q+1)):(P=null,M=f.localName=U);var ut=f.uri=N[P||""];if(x.startElement(ut,M,U,f),f.closed){if(x.endElement(ut,M,U),L)for(P in L)x.endPrefixMapping(P)}else return f.currentNSMap=N,f.localNSMap=L,!0}function rt(f,x,N,U,L){if(/^(?:script|textarea)$/i.test(N)){var C=f.indexOf("</"+N+">",x),_=f.substring(x+1,C);if(/[&<]/.test(_))return/^script$/i.test(N)?(L.characters(_,0,_.length),C):(_=_.replace(/&#?\\w+;/g,U),L.characters(_,0,_.length),C)}return x+1}function bt(f,x,N,U){var L=U[N];return L==null&&(L=f.lastIndexOf("</"+N+">"),L<x&&(L=f.lastIndexOf("</"+N)),U[N]=L),L<x}function ft(f,x){for(var N in f)x[N]=f[N]}function Ct(f,x,N,U){var L=f.charAt(x+2);switch(L){case"-":if(f.charAt(x+3)==="-"){var C=f.indexOf("-->",x+4);return C>x?(N.comment(f,x+4,C-x-4),C+3):(U.error("Unclosed comment"),-1)}else return-1;default:if(f.substr(x+3,6)=="CDATA["){var C=f.indexOf("]]>",x+9);return N.startCDATA(),N.characters(f,x+9,C-x-9),N.endCDATA(),C+3}var _=l(f,x),H=_.length;if(H>1&&/!doctype/i.test(_[0][0])){var P=_[1][0],M=!1,k=!1;H>3&&(/^public$/i.test(_[2][0])?(M=_[3][0],k=H>4&&_[4][0]):/^system$/i.test(_[2][0])&&(k=_[3][0]));var nt=_[H-1];return N.startDTD(P,M,k),N.endDTD(),nt.index+nt[0].length}}return-1}function ht(f,x,N){var U=f.indexOf("?>",x);if(U){var L=f.substring(x,U).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);return L?(L[0].length,N.processingInstruction(L[1],L[2]),U+2):-1}return-1}function b(){this.attributeNames={}}b.prototype={setTagName:function(f){if(!A.test(f))throw new Error("invalid tagName:"+f);this.tagName=f},addValue:function(f,x,N){if(!A.test(f))throw new Error("invalid attribute:"+f);this.attributeNames[f]=this.length,this[this.length++]={qName:f,value:x,offset:N}},length:0,getLocalName:function(f){return this[f].localName},getLocator:function(f){return this[f].locator},getQName:function(f){return this[f].qName},getURI:function(f){return this[f].uri},getValue:function(f){return this[f].value}};function l(f,x){var N,U=[],L=/'[^']+'|"[^"]+"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;for(L.lastIndex=x,L.exec(f);N=L.exec(f);)if(U.push(N),N[1])return U}return Jt.XMLReader=y,Jt.ParseError=St,Jt}var Xt={},re;function ne(){if(re)return Xt;re=1;function h(n,i){for(var s in n)i[s]=n[s]}function d(n,i){var s=n.prototype;if(!(s instanceof i)){let p=function(){};p.prototype=i.prototype,p=new p,h(s,p),n.prototype=s=p}s.constructor!=n&&(typeof n!="function"&&console.error("unknow Class:"+n),s.constructor=n)}var A="http://www.w3.org/1999/xhtml",O={},F=O.ELEMENT_NODE=1,V=O.ATTRIBUTE_NODE=2,W=O.TEXT_NODE=3,it=O.CDATA_SECTION_NODE=4,pt=O.ENTITY_REFERENCE_NODE=5,mt=O.ENTITY_NODE=6,at=O.PROCESSING_INSTRUCTION_NODE=7,St=O.COMMENT_NODE=8,y=O.DOCUMENT_NODE=9,$=O.DOCUMENT_TYPE_NODE=10,X=O.DOCUMENT_FRAGMENT_NODE=11,J=O.NOTATION_NODE=12,j={},rt={};j.INDEX_SIZE_ERR=(rt[1]="Index size error",1),j.DOMSTRING_SIZE_ERR=(rt[2]="DOMString size error",2);var bt=j.HIERARCHY_REQUEST_ERR=(rt[3]="Hierarchy request error",3);j.WRONG_DOCUMENT_ERR=(rt[4]="Wrong document",4),j.INVALID_CHARACTER_ERR=(rt[5]="Invalid character",5),j.NO_DATA_ALLOWED_ERR=(rt[6]="No data allowed",6),j.NO_MODIFICATION_ALLOWED_ERR=(rt[7]="No modification allowed",7);var ft=j.NOT_FOUND_ERR=(rt[8]="Not found",8);j.NOT_SUPPORTED_ERR=(rt[9]="Not supported",9);var Ct=j.INUSE_ATTRIBUTE_ERR=(rt[10]="Attribute in use",10);j.INVALID_STATE_ERR=(rt[11]="Invalid state",11),j.SYNTAX_ERR=(rt[12]="Syntax error",12),j.INVALID_MODIFICATION_ERR=(rt[13]="Invalid modification",13),j.NAMESPACE_ERR=(rt[14]="Invalid namespace",14),j.INVALID_ACCESS_ERR=(rt[15]="Invalid access",15);function ht(n,i){if(i instanceof Error)var s=i;else s=this,Error.call(this,rt[n]),this.message=rt[n],Error.captureStackTrace&&Error.captureStackTrace(this,ht);return s.code=n,i&&(this.message=this.message+": "+i),s}ht.prototype=Error.prototype,h(j,ht);function b(){}b.prototype={length:0,item:function(n){return this[n]||null},toString:function(n,i){for(var s=[],p=0;p<this.length;p++)dt(this[p],s,n,i);return s.join("")}};function l(n,i){this._node=n,this._refresh=i,f(this)}function f(n){var i=n._node._inc||n._node.ownerDocument._inc;if(n._inc!=i){var s=n._refresh(n._node);R(n,"length",s.length),h(s,n),n._inc=i}}l.prototype.item=function(n){return f(this),this[n]},d(l,b);function x(){}function N(n,i){for(var s=n.length;s--;)if(n[s]===i)return s}function U(n,i,s,p){if(p?i[N(i,p)]=s:i[i.length++]=s,n){s.ownerElement=n;var T=n.ownerDocument;T&&(p&&nt(T,n,p),k(T,n,s))}}function L(n,i,s){var p=N(i,s);if(p>=0){for(var T=i.length-1;p<T;)i[p]=i[++p];if(i.length=T,n){var E=n.ownerDocument;E&&(nt(E,n,s),s.ownerElement=null)}}else throw ht(ft,new Error(n.tagName+"@"+s))}x.prototype={length:0,item:b.prototype.item,getNamedItem:function(n){for(var i=this.length;i--;){var s=this[i];if(s.nodeName==n)return s}},setNamedItem:function(n){var i=n.ownerElement;if(i&&i!=this._ownerElement)throw new ht(Ct);var s=this.getNamedItem(n.nodeName);return U(this._ownerElement,this,n,s),s},setNamedItemNS:function(n){var i=n.ownerElement,s;if(i&&i!=this._ownerElement)throw new ht(Ct);return s=this.getNamedItemNS(n.namespaceURI,n.localName),U(this._ownerElement,this,n,s),s},removeNamedItem:function(n){var i=this.getNamedItem(n);return L(this._ownerElement,this,i),i},removeNamedItemNS:function(n,i){var s=this.getNamedItemNS(n,i);return L(this._ownerElement,this,s),s},getNamedItemNS:function(n,i){for(var s=this.length;s--;){var p=this[s];if(p.localName==i&&p.namespaceURI==n)return p}return null}};function C(n){if(this._features={},n)for(var i in n)this._features=n[i]}C.prototype={hasFeature:function(n,i){var s=this._features[n.toLowerCase()];return!!(s&&(!i||i in s))},createDocument:function(n,i,s){var p=new M;if(p.implementation=this,p.childNodes=new b,p.doctype=s,s&&p.appendChild(s),i){var T=p.createElementNS(n,i);p.appendChild(T)}return p},createDocumentType:function(n,i,s){var p=new Ft;return p.name=n,p.nodeName=n,p.publicId=i,p.systemId=s,p}};function _(){}_.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(n,i){return wt(this,n,i)},replaceChild:function(n,i){this.insertBefore(n,i),i&&this.removeChild(i)},removeChild:function(n){return ut(this,n)},appendChild:function(n){return this.insertBefore(n,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(n){return v(this.ownerDocument||this,this,n)},normalize:function(){for(var n=this.firstChild;n;){var i=n.nextSibling;i&&i.nodeType==W&&n.nodeType==W?(this.removeChild(i),n.appendData(i.data)):(n.normalize(),n=i)}},isSupported:function(n,i){return this.ownerDocument.implementation.hasFeature(n,i)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(n){for(var i=this;i;){var s=i._nsMap;if(s){for(var p in s)if(s[p]==n)return p}i=i.nodeType==V?i.ownerDocument:i.parentNode}return null},lookupNamespaceURI:function(n){for(var i=this;i;){var s=i._nsMap;if(s&&n in s)return s[n];i=i.nodeType==V?i.ownerDocument:i.parentNode}return null},isDefaultNamespace:function(n){var i=this.lookupPrefix(n);return i==null}};function H(n){return n=="<"&&"<"||n==">"&&">"||n=="&"&&"&"||n=='"'&&"""||"&#"+n.charCodeAt()+";"}h(O,_),h(O,_.prototype);function P(n,i){if(i(n))return!0;if(n=n.firstChild)do if(P(n,i))return!0;while(n=n.nextSibling)}function M(){}function k(n,i,s){n&&n._inc++;var p=s.namespaceURI;p=="http://www.w3.org/2000/xmlns/"&&(i._nsMap[s.prefix?s.localName:""]=s.value)}function nt(n,i,s,p){n&&n._inc++;var T=s.namespaceURI;T=="http://www.w3.org/2000/xmlns/"&&delete i._nsMap[s.prefix?s.localName:""]}function Q(n,i,s){if(n&&n._inc){n._inc++;var p=i.childNodes;if(s)p[p.length++]=s;else{for(var T=i.firstChild,E=0;T;)p[E++]=T,T=T.nextSibling;p.length=E}}}function ut(n,i){var s=i.previousSibling,p=i.nextSibling;return s?s.nextSibling=p:n.firstChild=p,p?p.previousSibling=s:n.lastChild=s,Q(n.ownerDocument,n),i}function wt(n,i,s){var p=i.parentNode;if(p&&p.removeChild(i),i.nodeType===X){var T=i.firstChild;if(T==null)return i;var E=i.lastChild}else T=E=i;var ct=s?s.previousSibling:n.lastChild;T.previousSibling=ct,E.nextSibling=s,ct?ct.nextSibling=T:n.firstChild=T,s==null?n.lastChild=E:s.previousSibling=E;do T.parentNode=n;while(T!==E&&(T=T.nextSibling));return Q(n.ownerDocument||n,n),i.nodeType==X&&(i.firstChild=i.lastChild=null),i}function lt(n,i){var s=i.parentNode;if(s){var p=n.lastChild;s.removeChild(i);var p=n.lastChild}var p=n.lastChild;return i.parentNode=n,i.previousSibling=p,i.nextSibling=null,p?p.nextSibling=i:n.firstChild=i,n.lastChild=i,Q(n.ownerDocument,n,i),i}M.prototype={nodeName:"#document",nodeType:y,doctype:null,documentElement:null,_inc:1,insertBefore:function(n,i){if(n.nodeType==X){for(var s=n.firstChild;s;){var p=s.nextSibling;this.insertBefore(s,i),s=p}return n}return this.documentElement==null&&n.nodeType==F&&(this.documentElement=n),wt(this,n,i),n.ownerDocument=this,n},removeChild:function(n){return this.documentElement==n&&(this.documentElement=null),ut(this,n)},importNode:function(n,i){return G(this,n,i)},getElementById:function(n){var i=null;return P(this.documentElement,function(s){if(s.nodeType==F&&s.getAttribute("id")==n)return i=s,!0}),i},getElementsByClassName:function(n){var i=new RegExp("(^|\\\\s)"+n+"(\\\\s|$)");return new l(this,function(s){var p=[];return P(s.documentElement,function(T){T!==s&&T.nodeType==F&&i.test(T.getAttribute("class"))&&p.push(T)}),p})},createElement:function(n){var i=new z;i.ownerDocument=this,i.nodeName=n,i.tagName=n,i.childNodes=new b;var s=i.attributes=new x;return s._ownerElement=i,i},createDocumentFragment:function(){var n=new At;return n.ownerDocument=this,n.childNodes=new b,n},createTextNode:function(n){var i=new ot;return i.ownerDocument=this,i.appendData(n),i},createComment:function(n){var i=new q;return i.ownerDocument=this,i.appendData(n),i},createCDATASection:function(n){var i=new Mt;return i.ownerDocument=this,i.appendData(n),i},createProcessingInstruction:function(n,i){var s=new c;return s.ownerDocument=this,s.tagName=s.target=n,s.nodeValue=s.data=i,s},createAttribute:function(n){var i=new vt;return i.ownerDocument=this,i.name=n,i.nodeName=n,i.localName=n,i.specified=!0,i},createEntityReference:function(n){var i=new Nt;return i.ownerDocument=this,i.nodeName=n,i},createElementNS:function(n,i){var s=new z,p=i.split(":"),T=s.attributes=new x;return s.childNodes=new b,s.ownerDocument=this,s.nodeName=i,s.tagName=i,s.namespaceURI=n,p.length==2?(s.prefix=p[0],s.localName=p[1]):s.localName=i,T._ownerElement=s,s},createAttributeNS:function(n,i){var s=new vt,p=i.split(":");return s.ownerDocument=this,s.nodeName=i,s.name=i,s.namespaceURI=n,s.specified=!0,p.length==2?(s.prefix=p[0],s.localName=p[1]):s.localName=i,s}},d(M,_);function z(){this._nsMap={}}z.prototype={nodeType:F,hasAttribute:function(n){return this.getAttributeNode(n)!=null},getAttribute:function(n){var i=this.getAttributeNode(n);return i&&i.value||""},getAttributeNode:function(n){return this.attributes.getNamedItem(n)},setAttribute:function(n,i){var s=this.ownerDocument.createAttribute(n);s.value=s.nodeValue=""+i,this.setAttributeNode(s)},removeAttribute:function(n){var i=this.getAttributeNode(n);i&&this.removeAttributeNode(i)},appendChild:function(n){return n.nodeType===X?this.insertBefore(n,null):lt(this,n)},setAttributeNode:function(n){return this.attributes.setNamedItem(n)},setAttributeNodeNS:function(n){return this.attributes.setNamedItemNS(n)},removeAttributeNode:function(n){return this.attributes.removeNamedItem(n.nodeName)},removeAttributeNS:function(n,i){var s=this.getAttributeNodeNS(n,i);s&&this.removeAttributeNode(s)},hasAttributeNS:function(n,i){return this.getAttributeNodeNS(n,i)!=null},getAttributeNS:function(n,i){var s=this.getAttributeNodeNS(n,i);return s&&s.value||""},setAttributeNS:function(n,i,s){var p=this.ownerDocument.createAttributeNS(n,i);p.value=p.nodeValue=""+s,this.setAttributeNode(p)},getAttributeNodeNS:function(n,i){return this.attributes.getNamedItemNS(n,i)},getElementsByTagName:function(n){return new l(this,function(i){var s=[];return P(i,function(p){p!==i&&p.nodeType==F&&(n==="*"||p.tagName==n)&&s.push(p)}),s})},getElementsByTagNameNS:function(n,i){return new l(this,function(s){var p=[];return P(s,function(T){T!==s&&T.nodeType===F&&(n==="*"||T.namespaceURI===n)&&(i==="*"||T.localName==i)&&p.push(T)}),p})}},M.prototype.getElementsByTagName=z.prototype.getElementsByTagName,M.prototype.getElementsByTagNameNS=z.prototype.getElementsByTagNameNS,d(z,_);function vt(){}vt.prototype.nodeType=V,d(vt,_);function xt(){}xt.prototype={data:"",substringData:function(n,i){return this.data.substring(n,n+i)},appendData:function(n){n=this.data+n,this.nodeValue=this.data=n,this.length=n.length},insertData:function(n,i){this.replaceData(n,0,i)},appendChild:function(n){throw new Error(rt[bt])},deleteData:function(n,i){this.replaceData(n,i,"")},replaceData:function(n,i,s){var p=this.data.substring(0,n),T=this.data.substring(n+i);s=p+s+T,this.nodeValue=this.data=s,this.length=s.length}},d(xt,_);function ot(){}ot.prototype={nodeName:"#text",nodeType:W,splitText:function(n){var i=this.data,s=i.substring(n);i=i.substring(0,n),this.data=this.nodeValue=i,this.length=i.length;var p=this.ownerDocument.createTextNode(s);return this.parentNode&&this.parentNode.insertBefore(p,this.nextSibling),p}},d(ot,xt);function q(){}q.prototype={nodeName:"#comment",nodeType:St},d(q,xt);function Mt(){}Mt.prototype={nodeName:"#cdata-section",nodeType:it},d(Mt,xt);function Ft(){}Ft.prototype.nodeType=$,d(Ft,_);function Ht(){}Ht.prototype.nodeType=J,d(Ht,_);function Yt(){}Yt.prototype.nodeType=mt,d(Yt,_);function Nt(){}Nt.prototype.nodeType=pt,d(Nt,_);function At(){}At.prototype.nodeName="#document-fragment",At.prototype.nodeType=X,d(At,_);function c(){}c.prototype.nodeType=at,d(c,_);function Vt(){}Vt.prototype.serializeToString=function(n,i,s){return g.call(n,i,s)},_.prototype.toString=g;function g(n,i){var s=[],p=this.nodeType==9&&this.documentElement||this,T=p.prefix,E=p.namespaceURI;if(E&&T==null){var T=p.lookupPrefix(E);if(T==null)var ct=[{namespace:E,prefix:null}]}return dt(this,s,n,i,ct),s.join("")}function Ot(n,i,s){var p=n.prefix||"",T=n.namespaceURI;if(!p&&!T||p==="xml"&&T==="http://www.w3.org/XML/1998/namespace"||T=="http://www.w3.org/2000/xmlns/")return!1;for(var E=s.length;E--;){var ct=s[E];if(ct.prefix==p)return ct.namespace!=T}return!0}function dt(n,i,s,p,T){if(p)if(n=p(n),n){if(typeof n=="string"){i.push(n);return}}else return;switch(n.nodeType){case F:T||(T=[]),T.length;var E=n.attributes,ct=E.length,gt=n.firstChild,Dt=n.tagName;s=A===n.namespaceURI||s,i.push("<",Dt);for(var Tt=0;Tt<ct;Tt++){var st=E.item(Tt);st.prefix=="xmlns"?T.push({prefix:st.localName,namespace:st.value}):st.nodeName=="xmlns"&&T.push({prefix:"",namespace:st.value})}for(var Tt=0;Tt<ct;Tt++){var st=E.item(Tt);if(Ot(st,s,T)){var Et=st.prefix||"",I=st.namespaceURI,S=Et?" xmlns:"+Et:" xmlns";i.push(S,'="',I,'"'),T.push({prefix:Et,namespace:I})}dt(st,i,s,p,T)}if(Ot(n,s,T)){var Et=n.prefix||"",I=n.namespaceURI;if(I){var S=Et?" xmlns:"+Et:" xmlns";i.push(S,'="',I,'"'),T.push({prefix:Et,namespace:I})}}if(gt||s&&!/^(?:meta|link|img|br|hr|input)$/i.test(Dt)){if(i.push(">"),s&&/^script$/i.test(Dt))for(;gt;)gt.data?i.push(gt.data):dt(gt,i,s,p,T),gt=gt.nextSibling;else for(;gt;)dt(gt,i,s,p,T),gt=gt.nextSibling;i.push("</",Dt,">")}else i.push("/>");return;case y:case X:for(var gt=n.firstChild;gt;)dt(gt,i,s,p,T),gt=gt.nextSibling;return;case V:return i.push(" ",n.name,'="',n.value.replace(/[<&"]/g,H),'"');case W:return i.push(n.data.replace(/[<&]/g,H).replace(/]]>/g,"]]>"));case it:return i.push("<![CDATA[",n.data,"]]>");case St:return i.push("<!--",n.data,"-->");case $:var _t=n.publicId,yt=n.systemId;if(i.push("<!DOCTYPE ",n.name),_t)i.push(" PUBLIC ",_t),yt&&yt!="."&&i.push(" ",yt),i.push(">");else if(yt&&yt!=".")i.push(" SYSTEM ",yt,">");else{var Bt=n.internalSubset;Bt&&i.push(" [",Bt,"]"),i.push(">")}return;case at:return i.push("<?",n.target," ",n.data,"?>");case pt:return i.push("&",n.nodeName,";");default:i.push("??",n.nodeName)}}function G(n,i,s){var p;switch(i.nodeType){case F:p=i.cloneNode(!1),p.ownerDocument=n;case X:break;case V:s=!0;break}if(p||(p=i.cloneNode(!1)),p.ownerDocument=n,p.parentNode=null,s)for(var T=i.firstChild;T;)p.appendChild(G(n,T,s)),T=T.nextSibling;return p}function v(n,i,s){var p=new i.constructor;for(var T in i){var E=i[T];typeof E!="object"&&E!=p[T]&&(p[T]=E)}switch(i.childNodes&&(p.childNodes=new b),p.ownerDocument=n,p.nodeType){case F:var ct=i.attributes,Dt=p.attributes=new x,Tt=ct.length;Dt._ownerElement=p;for(var st=0;st<Tt;st++)p.setAttributeNode(v(n,ct.item(st),!0));break;case V:s=!0}if(s)for(var Et=i.firstChild;Et;)p.appendChild(v(n,Et,s)),Et=Et.nextSibling;return p}function R(n,i,s){n[i]=s}try{if(Object.defineProperty){let n=function(i){switch(i.nodeType){case F:case X:var s=[];for(i=i.firstChild;i;)i.nodeType!==7&&i.nodeType!==8&&s.push(n(i)),i=i.nextSibling;return s.join("");default:return i.nodeValue}};Object.defineProperty(l.prototype,"length",{get:function(){return f(this),this.$$length}}),Object.defineProperty(_.prototype,"textContent",{get:function(){return n(this)},set:function(i){switch(this.nodeType){case F:case X:for(;this.firstChild;)this.removeChild(this.firstChild);(i||String(i))&&this.appendChild(this.ownerDocument.createTextNode(i));break;default:this.data=i,this.value=i,this.nodeValue=i}}}),R=function(i,s,p){i["$$"+s]=p}}}catch{}return Xt.Node=_,Xt.DOMException=ht,Xt.DOMImplementation=C,Xt.XMLSerializer=Vt,Xt}var ie;function de(){if(ie)return Gt;ie=1;function h(y){this.options=y||{locator:{}}}h.prototype.parseFromString=function(y,$){var X=this.options,J=new mt,j=X.domBuilder||new A,rt=X.errorHandler,bt=X.locator,ft=X.xmlns||{},Ct=/\\/x?html?$/.test($),ht=Ct?it.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return bt&&j.setDocumentLocator(bt),J.errorHandler=d(rt,j,bt),J.domBuilder=X.domBuilder||j,Ct&&(ft[""]="http://www.w3.org/1999/xhtml"),ft.xml=ft.xml||"http://www.w3.org/XML/1998/namespace",y&&typeof y=="string"?J.parse(y,ft,ht):J.errorHandler.error("invalid doc source"),j.doc};function d(y,$,X){if(!y){if($ instanceof A)return $;y=$}var J={},j=y instanceof Function;X=X||{};function rt(bt){var ft=y[bt];!ft&&j&&(ft=y.length==2?function(Ct){y(bt,Ct)}:y),J[bt]=ft&&function(Ct){ft("[xmldom "+bt+"] "+Ct+F(X))}||function(){}}return rt("warning"),rt("error"),rt("fatalError"),J}function A(){this.cdata=!1}function O(y,$){$.lineNumber=y.lineNumber,$.columnNumber=y.columnNumber}A.prototype={startDocument:function(){this.doc=new St().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(y,$,X,J){var j=this.doc,rt=j.createElementNS(y,X||$),bt=J.length;W(this,rt),this.currentElement=rt,this.locator&&O(this.locator,rt);for(var ft=0;ft<bt;ft++){var y=J.getURI(ft),Ct=J.getValue(ft),X=J.getQName(ft),ht=j.createAttributeNS(y,X);this.locator&&O(J.getLocator(ft),ht),ht.value=ht.nodeValue=Ct,rt.setAttributeNode(ht)}},endElement:function(y,$,X){var J=this.currentElement;J.tagName,this.currentElement=J.parentNode},startPrefixMapping:function(y,$){},endPrefixMapping:function(y){},processingInstruction:function(y,$){var X=this.doc.createProcessingInstruction(y,$);this.locator&&O(this.locator,X),W(this,X)},ignorableWhitespace:function(y,$,X){},characters:function(y,$,X){if(y=V.apply(this,arguments),y){if(this.cdata)var J=this.doc.createCDATASection(y);else var J=this.doc.createTextNode(y);this.currentElement?this.currentElement.appendChild(J):/^\\s*$/.test(y)&&this.doc.appendChild(J),this.locator&&O(this.locator,J)}},skippedEntity:function(y){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(y){(this.locator=y)&&(y.lineNumber=0)},comment:function(y,$,X){y=V.apply(this,arguments);var J=this.doc.createComment(y);this.locator&&O(this.locator,J),W(this,J)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(y,$,X){var J=this.doc.implementation;if(J&&J.createDocumentType){var j=J.createDocumentType(y,$,X);this.locator&&O(this.locator,j),W(this,j)}},warning:function(y){console.warn("[xmldom warning] "+y,F(this.locator))},error:function(y){console.error("[xmldom error] "+y,F(this.locator))},fatalError:function(y){throw new at(y,this.locator)}};function F(y){if(y)return\`
|
|
7
|
+
@\`+(y.systemId||"")+"#[line:"+y.lineNumber+",col:"+y.columnNumber+"]"}function V(y,$,X){return typeof y=="string"?y.substr($,X):y.length>=$+X||$?new java.lang.String(y,$,X)+"":y}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\\w+/g,function(y){A.prototype[y]=function(){return null}});function W(y,$){y.currentElement?y.currentElement.appendChild($):y.doc.appendChild($)}var it=Ee(),pt=me(),mt=pt.XMLReader,at=pt.ParseError,St=Gt.DOMImplementation=ne().DOMImplementation;return Gt.XMLSerializer=ne().XMLSerializer,Gt.DOMParser=h,Gt.__DOMHandler=A,Gt}var xe=de(),Zt={},oe;function Ne(){return oe||(oe=1,(function(h){var d=h;(function(A){var O="__namespace",F=function(t){return t==null},V=function(t){return t===O||Number.isInteger(t)&&t>=1&&t<=11},W=function(t){return t&&V(t.nodeType)&&typeof t.nodeName=="string"};function it(t){var e=Array.prototype.slice,r=t.length,a=function(u,D){return function(){return D.apply(this,u.concat(e.call(arguments)))}},o=function(){var u=e.call(arguments);return u.length<r?a(u,o):t.apply(this,e.apply(arguments,[0,r]))};return o}var pt=function(t,e){for(var r=0;r<e.length;r+=1)t(e[r],r,e)},mt=function(t,e,r){var a=e;return pt(function(o,u){a=t(a,o,u)},r),a},at=function(t,e){var r=new Array(e.length);return pt(function(a,o){r[o]=t(a)},e),r},St=function(t,e){var r=[];return pt(function(a,o){t(a,o)&&r.push(a)},e),r},y=function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return!0;return!1};function $(t){return function(){return t}}function X(t){return t.toString()}var J=function(t,e){return e.join(t)},j=function(t,e,r){return t+r+e},rt=Array.prototype.concat,bt=function(t,e){var r=new E;r.addArray(t);var a=r.toArray();return e?a.reverse():a},ft=32767;function Ct(t){for(var e=[],r=0;r<t.length;r+=ft){var a=t.slice(r,r+ft);e=rt.apply(e,a)}return e}function ht(t,e){for(var r=Object(t),a=1;a<arguments.length;a++){var o=arguments[a];if(o!=null)for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(r[u]=o[u])}return r}var b={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NAMESPACE_NODE:O};l.prototype=new Object,l.prototype.constructor=l,l.superclass=Object.prototype;function l(){this.init()}l.prototype.init=function(){this.reduceActions=[],this.reduceActions[3]=function(t){return new _(t[0],t[2])},this.reduceActions[5]=function(t){return new H(t[0],t[2])},this.reduceActions[7]=function(t){return new P(t[0],t[2])},this.reduceActions[8]=function(t){return new M(t[0],t[2])},this.reduceActions[10]=function(t){return new k(t[0],t[2])},this.reduceActions[11]=function(t){return new nt(t[0],t[2])},this.reduceActions[12]=function(t){return new Q(t[0],t[2])},this.reduceActions[13]=function(t){return new ut(t[0],t[2])},this.reduceActions[15]=function(t){return new wt(t[0],t[2])},this.reduceActions[16]=function(t){return new lt(t[0],t[2])},this.reduceActions[18]=function(t){return new z(t[0],t[2])},this.reduceActions[19]=function(t){return new vt(t[0],t[2])},this.reduceActions[20]=function(t){return new xt(t[0],t[2])},this.reduceActions[22]=function(t){return new L(t[1])},this.reduceActions[24]=function(t){return new ot(t[0],t[2])},this.reduceActions[25]=function(t){return new q(void 0,void 0,t[0])},this.reduceActions[27]=function(t){return t[0].locationPath=t[2],t[0]},this.reduceActions[28]=function(t){return t[0].locationPath=t[2],t[0].locationPath.steps.unshift(new c(c.DESCENDANTORSELF,g.nodeTest,[])),t[0]},this.reduceActions[29]=function(t){return new q(t[0],[],void 0)},this.reduceActions[30]=function(t){return S.instance_of(t[0],q)?(t[0].filterPredicates==null&&(t[0].filterPredicates=[]),t[0].filterPredicates.push(t[1]),t[0]):new q(t[0],[t[1]],void 0)},this.reduceActions[32]=function(t){return t[1]},this.reduceActions[33]=function(t){return new v(t[0])},this.reduceActions[34]=function(t){return new R(t[0])},this.reduceActions[36]=function(t){return new dt(t[0],[])},this.reduceActions[37]=function(t){return new dt(t[0],t[2])},this.reduceActions[38]=function(t){return[t[0]]},this.reduceActions[39]=function(t){return t[2].unshift(t[0]),t[2]},this.reduceActions[43]=function(t){return new At(!0,[])},this.reduceActions[44]=function(t){return t[1].absolute=!0,t[1]},this.reduceActions[46]=function(t){return new At(!1,[t[0]])},this.reduceActions[47]=function(t){return t[0].steps.push(t[2]),t[0]},this.reduceActions[49]=function(t){return new c(t[0],t[1],[])},this.reduceActions[50]=function(t){return new c(c.CHILD,t[0],[])},this.reduceActions[51]=function(t){return new c(t[0],t[1],t[2])},this.reduceActions[52]=function(t){return new c(c.CHILD,t[0],t[1])},this.reduceActions[54]=function(t){return[t[0]]},this.reduceActions[55]=function(t){return t[1].unshift(t[0]),t[1]},this.reduceActions[56]=function(t){return t[0]=="ancestor"?c.ANCESTOR:t[0]=="ancestor-or-self"?c.ANCESTORORSELF:t[0]=="attribute"?c.ATTRIBUTE:t[0]=="child"?c.CHILD:t[0]=="descendant"?c.DESCENDANT:t[0]=="descendant-or-self"?c.DESCENDANTORSELF:t[0]=="following"?c.FOLLOWING:t[0]=="following-sibling"?c.FOLLOWINGSIBLING:t[0]=="namespace"?c.NAMESPACE:t[0]=="parent"?c.PARENT:t[0]=="preceding"?c.PRECEDING:t[0]=="preceding-sibling"?c.PRECEDINGSIBLING:t[0]=="self"?c.SELF:-1},this.reduceActions[57]=function(t){return c.ATTRIBUTE},this.reduceActions[59]=function(t){return t[0]=="comment"?g.commentTest:t[0]=="text"?g.textTest:t[0]=="processing-instruction"?g.anyPiTest:t[0]=="node"?g.nodeTest:new g(-1,void 0)},this.reduceActions[60]=function(t){return new g.PITest(t[2])},this.reduceActions[61]=function(t){return t[1]},this.reduceActions[63]=function(t){return t[1].absolute=!0,t[1].steps.unshift(new c(c.DESCENDANTORSELF,g.nodeTest,[])),t[1]},this.reduceActions[64]=function(t){return t[0].steps.push(new c(c.DESCENDANTORSELF,g.nodeTest,[])),t[0].steps.push(t[2]),t[0]},this.reduceActions[65]=function(t){return new c(c.SELF,g.nodeTest,[])},this.reduceActions[66]=function(t){return new c(c.PARENT,g.nodeTest,[])},this.reduceActions[67]=function(t){return new Ot(t[1])},this.reduceActions[68]=function(t){return g.nameTestAny},this.reduceActions[69]=function(t){return new g.NameTestPrefixAny(t[0].split(":")[0])},this.reduceActions[70]=function(t){return new g.NameTestQName(t[0])}},l.actionTable=[" s s sssssssss s ss s ss"," s ","r rrrrrrrrr rrrrrrr rr r "," rrrrr "," s s sssssssss s ss s ss","rs rrrrrrrr s sssssrrrrrr rrs rs "," s s sssssssss s ss s ss"," s "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s "," s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr r ","a ","r s rr r ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrs rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r srrrrrrrr rrrrrrs rr sr ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r "," sssss ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrr rrrrr rr r "," s "," s "," rrrrr "," s s sssssssss s sss s ss","r srrrrrrrr rrrrrrs rr r "," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss ss s ss"," s s sssssssss s ss s ss"," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr rr "," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," rr "," s "," rs ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrr rr r "," r "," s ","r srrrrrrrr rrrrrrs rr r ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s s sssssssss s ss s ss","r rrrrrrrrr rrrrrrr rr rr "," r "],l.actionTableNumber=[\` 1 0 /.-,+*)(' & %$ # "!\`," J ","a aaaaaaaaa aaaaaaa aa a "," YYYYY ",\` 1 0 /.-,+*)(' & %$ # "!\`,\`K1 KKKKKKKK . +*)('KKKKKK KK# K" \`,\` 1 0 /.-,+*)(' & %$ # "!\`," N "," O ","e eeeeeeeee eeeeeee ee ee ","f fffffffff fffffff ff ff ","d ddddddddd ddddddd dd dd ","B BBBBBBBBB BBBBBBB BB BB ","A AAAAAAAAA AAAAAAA AA AA "," P "," Q ",\` 1 . +*)(' # " \`,"b bbbbbbbbb bbbbbbb bb b "," ","! S !! ! ",'" T" "" " ',"$ V $$ U $$ $ ","& &ZY&& &XW && & ",") ))))) )))\\\\[ )) ) ",". ....._^] ..... .. . ","1 11111111 11111 11 1 ","5 55555555 55555\` 55 5 ","7 77777777 777777 77 7 ","9 99999999 999999 99 9 ",": c:::::::: ::::::b :: a: ","I fIIIIIIII IIIIIIe II I ","= ========= ======= == == ","? ????????? ??????? ?? ?? ","C CCCCCCCCC CCCCCCC CC CC ","J JJJJJJJJ JJJJJJ JJ J ","M MMMMMMMM MMMMMM MM M ","N NNNNNNNNN NNNNNNN NN N ","P PPPPPPPPP PPPPPPP PP P "," +*)(' ","R RRRRRRRRR RRRRRRR RR aR ","U UUUUUUUUU UUUUUUU UU U ","Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ","c ccccccccc ccccccc cc cc "," j ","L fLLLLLLLL LLLLLLe LL L ","6 66666666 66666 66 6 "," k "," l "," XXXXX ",\` 1 0 /.-,+*)(' & %$m # "!\`,"_ f________ ______e __ _ ",\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 0 /.-,+*)(' %$ # "!\`,\` 1 0 /.-,+*)(' & %$ # "!\`,\` 1 . +*)(' # " \`,\` 1 . +*)(' # " \`,"> >>>>>>>>> >>>>>>> >> >> ",\` 1 . +*)(' # " \`,\` 1 . +*)(' # " \`,"Q QQQQQQQQQ QQQQQQQ QQ aQ ","V VVVVVVVVV VVVVVVV VV aV ","T TTTTTTTTT TTTTTTT TT T ","@ @@@@@@@@@ @@@@@@@ @@ @@ "," ","[ [[[[[[[[[ [[[[[[[ [[ [[ ","D DDDDDDDDD DDDDDDD DD DD "," HH "," "," F ","# T# ## # ","% V %% U %% % ","' 'ZY'' 'XW '' ' ","( (ZY(( (XW (( ( ","+ +++++ +++\\\\[ ++ + ","* ***** ***\\\\[ ** * ","- ----- ---\\\\[ -- - ",", ,,,,, ,,,\\\\[ ,, , ","0 00000_^] 00000 00 0 ","/ /////_^] ///// // / ","2 22222222 22222 22 2 ","3 33333333 33333 33 3 ","4 44444444 44444 44 4 ","8 88888888 888888 88 8 "," ^ "," ","; f;;;;;;;; ;;;;;;e ;; ; ","< f<<<<<<<< <<<<<<e << < ","O OOOOOOOOO OOOOOOO OO O ","\` \`\`\`\`\`\`\`\`\` \`\`\`\`\`\`\` \`\` \` ","S SSSSSSSSS SSSSSSS SS S ","W WWWWWWWWW WWWWWWW WW W ","\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\ \\\\\\\\ ","E EEEEEEEEE EEEEEEE EE EE ",\` 1 0 /.-,+*)(' & %$ # "!\`,"] ]]]]]]]]] ]]]]]]] ]] ]] "," G "],l.gotoTable=["3456789:;<=>?@ AB CDEFGH IJ "," "," "," ","L456789:;<=>?@ AB CDEFGH IJ "," M EFGH IJ "," N;<=>?@ AB CDEFGH IJ "," "," "," "," "," "," "," "," "," "," S EFGH IJ "," "," "," "," "," "," "," "," "," "," "," "," "," e "," "," "," "," "," "," "," "," "," h J "," i j "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABpqCDEFGH IJ "," "," r6789:;<=>?@ AB CDEFGH IJ "," s789:;<=>?@ AB CDEFGH IJ "," t89:;<=>?@ AB CDEFGH IJ "," u89:;<=>?@ AB CDEFGH IJ "," v9:;<=>?@ AB CDEFGH IJ "," w9:;<=>?@ AB CDEFGH IJ "," x9:;<=>?@ AB CDEFGH IJ "," y9:;<=>?@ AB CDEFGH IJ "," z:;<=>?@ AB CDEFGH IJ "," {:;<=>?@ AB CDEFGH IJ "," |;<=>?@ AB CDEFGH IJ "," };<=>?@ AB CDEFGH IJ "," ~;<=>?@ AB CDEFGH IJ "," =>?@ AB CDEFGH IJ ","456789:;<=>?@ AB CDEFGH IJ"," EFGH IJ "," EFGH IJ "," "," GH IJ ","
GH IJ "," i "," i "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABqCDEFGH IJ "," "," "],l.productions=[[1,1,2],[2,1,3],[3,1,4],[3,3,3,-9,4],[4,1,5],[4,3,4,-8,5],[5,1,6],[5,3,5,-22,6],[5,3,5,-5,6],[6,1,7],[6,3,6,-23,7],[6,3,6,-24,7],[6,3,6,-6,7],[6,3,6,-7,7],[7,1,8],[7,3,7,-25,8],[7,3,7,-26,8],[8,1,9],[8,3,8,-12,9],[8,3,8,-11,9],[8,3,8,-10,9],[9,1,10],[9,2,-26,9],[10,1,11],[10,3,10,-27,11],[11,1,12],[11,1,13],[11,3,13,-28,14],[11,3,13,-4,14],[13,1,15],[13,2,13,16],[15,1,17],[15,3,-29,2,-30],[15,1,-15],[15,1,-16],[15,1,18],[18,3,-13,-29,-30],[18,4,-13,-29,19,-30],[19,1,20],[19,3,20,-31,19],[20,1,2],[12,1,14],[12,1,21],[21,1,-28],[21,2,-28,14],[21,1,22],[14,1,23],[14,3,14,-28,23],[14,1,24],[23,2,25,26],[23,1,26],[23,3,25,26,27],[23,2,26,27],[23,1,28],[27,1,16],[27,2,16,27],[25,2,-14,-3],[25,1,-32],[26,1,29],[26,3,-20,-29,-30],[26,4,-21,-29,-15,-30],[16,3,-33,30,-34],[30,1,2],[22,2,-4,14],[24,3,14,-4,23],[28,1,-35],[28,1,-2],[17,2,-36,-18],[29,1,-17],[29,1,-19],[29,1,-18]],l.DOUBLEDOT=2,l.DOUBLECOLON=3,l.DOUBLESLASH=4,l.NOTEQUAL=5,l.LESSTHANOREQUAL=6,l.GREATERTHANOREQUAL=7,l.AND=8,l.OR=9,l.MOD=10,l.DIV=11,l.MULTIPLYOPERATOR=12,l.FUNCTIONNAME=13,l.AXISNAME=14,l.LITERAL=15,l.NUMBER=16,l.ASTERISKNAMETEST=17,l.QNAME=18,l.NCNAMECOLONASTERISK=19,l.NODETYPE=20,l.PROCESSINGINSTRUCTIONWITHLITERAL=21,l.EQUALS=22,l.LESSTHAN=23,l.GREATERTHAN=24,l.PLUS=25,l.MINUS=26,l.BAR=27,l.SLASH=28,l.LEFTPARENTHESIS=29,l.RIGHTPARENTHESIS=30,l.COMMA=31,l.AT=32,l.LEFTBRACKET=33,l.RIGHTBRACKET=34,l.DOT=35,l.DOLLAR=36,l.prototype.tokenize=function(t){for(var e=[],r=[],a=t+"\\0",o=0,u=a.charAt(o++);;){for(;u==" "||u==" "||u=="\\r"||u==\`
|
|
8
|
+
\`;)u=a.charAt(o++);if(u=="\\0"||o>=a.length)break;if(u=="("){e.push(l.LEFTPARENTHESIS),r.push(u),u=a.charAt(o++);continue}if(u==")"){e.push(l.RIGHTPARENTHESIS),r.push(u),u=a.charAt(o++);continue}if(u=="["){e.push(l.LEFTBRACKET),r.push(u),u=a.charAt(o++);continue}if(u=="]"){e.push(l.RIGHTBRACKET),r.push(u),u=a.charAt(o++);continue}if(u=="@"){e.push(l.AT),r.push(u),u=a.charAt(o++);continue}if(u==","){e.push(l.COMMA),r.push(u),u=a.charAt(o++);continue}if(u=="|"){e.push(l.BAR),r.push(u),u=a.charAt(o++);continue}if(u=="+"){e.push(l.PLUS),r.push(u),u=a.charAt(o++);continue}if(u=="-"){e.push(l.MINUS),r.push(u),u=a.charAt(o++);continue}if(u=="="){e.push(l.EQUALS),r.push(u),u=a.charAt(o++);continue}if(u=="$"){e.push(l.DOLLAR),r.push(u),u=a.charAt(o++);continue}if(u=="."){if(u=a.charAt(o++),u=="."){e.push(l.DOUBLEDOT),r.push(".."),u=a.charAt(o++);continue}if(u>="0"&&u<="9"){var D="."+u;for(u=a.charAt(o++);u>="0"&&u<="9";)D+=u,u=a.charAt(o++);e.push(l.NUMBER),r.push(D);continue}e.push(l.DOT),r.push(".");continue}if(u=="'"||u=='"'){for(var Z=u,tt="";o<a.length&&(u=a.charAt(o))!==Z;)tt+=u,o+=1;if(u!==Z)throw _t.fromMessage("Unterminated string literal: "+Z+tt);o+=1,e.push(l.LITERAL),r.push(tt),u=a.charAt(o++);continue}if(u>="0"&&u<="9"){var D=u;for(u=a.charAt(o++);u>="0"&&u<="9";)D+=u,u=a.charAt(o++);if(u=="."&&a.charAt(o)>="0"&&a.charAt(o)<="9")for(D+=u,D+=a.charAt(o++),u=a.charAt(o++);u>="0"&&u<="9";)D+=u,u=a.charAt(o++);e.push(l.NUMBER),r.push(D);continue}if(u=="*"){if(e.length>0){var w=e[e.length-1];if(w!=l.AT&&w!=l.DOUBLECOLON&&w!=l.LEFTPARENTHESIS&&w!=l.LEFTBRACKET&&w!=l.AND&&w!=l.OR&&w!=l.MOD&&w!=l.DIV&&w!=l.MULTIPLYOPERATOR&&w!=l.SLASH&&w!=l.DOUBLESLASH&&w!=l.BAR&&w!=l.PLUS&&w!=l.MINUS&&w!=l.EQUALS&&w!=l.NOTEQUAL&&w!=l.LESSTHAN&&w!=l.LESSTHANOREQUAL&&w!=l.GREATERTHAN&&w!=l.GREATERTHANOREQUAL){e.push(l.MULTIPLYOPERATOR),r.push(u),u=a.charAt(o++);continue}}e.push(l.ASTERISKNAMETEST),r.push(u),u=a.charAt(o++);continue}if(u==":"&&a.charAt(o)==":"){e.push(l.DOUBLECOLON),r.push("::"),o++,u=a.charAt(o++);continue}if(u=="/"){if(u=a.charAt(o++),u=="/"){e.push(l.DOUBLESLASH),r.push("//"),u=a.charAt(o++);continue}e.push(l.SLASH),r.push("/");continue}if(u=="!"&&a.charAt(o)=="="){e.push(l.NOTEQUAL),r.push("!="),o++,u=a.charAt(o++);continue}if(u=="<"){if(a.charAt(o)=="="){e.push(l.LESSTHANOREQUAL),r.push("<="),o++,u=a.charAt(o++);continue}e.push(l.LESSTHAN),r.push("<"),u=a.charAt(o++);continue}if(u==">"){if(a.charAt(o)=="="){e.push(l.GREATERTHANOREQUAL),r.push(">="),o++,u=a.charAt(o++);continue}e.push(l.GREATERTHAN),r.push(">"),u=a.charAt(o++);continue}if(u=="_"||S.isLetter(u.charCodeAt(0))){var B=u;for(u=a.charAt(o++);S.isNCNameChar(u.charCodeAt(0));)B+=u,u=a.charAt(o++);if(e.length>0){var w=e[e.length-1];if(w!=l.AT&&w!=l.DOUBLECOLON&&w!=l.LEFTPARENTHESIS&&w!=l.LEFTBRACKET&&w!=l.AND&&w!=l.OR&&w!=l.MOD&&w!=l.DIV&&w!=l.MULTIPLYOPERATOR&&w!=l.SLASH&&w!=l.DOUBLESLASH&&w!=l.BAR&&w!=l.PLUS&&w!=l.MINUS&&w!=l.EQUALS&&w!=l.NOTEQUAL&&w!=l.LESSTHAN&&w!=l.LESSTHANOREQUAL&&w!=l.GREATERTHAN&&w!=l.GREATERTHANOREQUAL){if(B=="and"){e.push(l.AND),r.push(B);continue}if(B=="or"){e.push(l.OR),r.push(B);continue}if(B=="mod"){e.push(l.MOD),r.push(B);continue}if(B=="div"){e.push(l.DIV),r.push(B);continue}}}if(u==":"){if(a.charAt(o)=="*"){e.push(l.NCNAMECOLONASTERISK),r.push(B+":*"),o++,u=a.charAt(o++);continue}if(a.charAt(o)=="_"||S.isLetter(a.charCodeAt(o))){for(B+=":",u=a.charAt(o++);S.isNCNameChar(u.charCodeAt(0));)B+=u,u=a.charAt(o++);if(u=="("){e.push(l.FUNCTIONNAME),r.push(B);continue}e.push(l.QNAME),r.push(B);continue}if(a.charAt(o)==":"){e.push(l.AXISNAME),r.push(B);continue}}if(u=="("){if(B=="comment"||B=="text"||B=="node"){e.push(l.NODETYPE),r.push(B);continue}if(B=="processing-instruction"){a.charAt(o)==")"?e.push(l.NODETYPE):e.push(l.PROCESSINGINSTRUCTIONWITHLITERAL),r.push(B);continue}e.push(l.FUNCTIONNAME),r.push(B);continue}e.push(l.QNAME),r.push(B);continue}throw new Error("Unexpected character "+u)}return e.push(1),r.push("[EOF]"),[e,r]},l.SHIFT="s",l.REDUCE="r",l.ACCEPT="a",l.prototype.parse=function(tt){if(!tt)throw new Error("XPath expression unspecified.");if(typeof tt!="string")throw new Error("XPath expression must be a string.");var e,r,a=this.tokenize(tt);if(a!=null){e=a[0],r=a[1];var o=0,u=[],D=[],Z=[],tt,w,B;for(u.push(0),D.push(1),Z.push("_S"),w=e[o],B=r[o++];;)switch(tt=u[u.length-1],l.actionTable[tt].charAt(w-1)){case l.SHIFT:D.push(-w),Z.push(B),u.push(l.actionTableNumber[tt].charCodeAt(w-1)-32),w=e[o],B=r[o++];break;case l.REDUCE:for(var Lt=l.productions[l.actionTableNumber[tt].charCodeAt(w-1)-32][1],kt=[],jt=0;jt<Lt;jt++)D.pop(),kt.unshift(Z.pop()),u.pop();var qt=u[u.length-1];D.push(l.productions[l.actionTableNumber[tt].charCodeAt(w-1)-32][0]),this.reduceActions[l.actionTableNumber[tt].charCodeAt(w-1)-32]==null?Z.push(kt[0]):Z.push(this.reduceActions[l.actionTableNumber[tt].charCodeAt(w-1)-32](kt)),u.push(l.gotoTable[qt].charCodeAt(l.productions[l.actionTableNumber[tt].charCodeAt(w-1)-32][0]-2)-33);break;case l.ACCEPT:return new f(Z.pop());default:throw new Error("XPath parse error")}}},f.prototype=new Object,f.prototype.constructor=f,f.superclass=Object.prototype;function f(t){this.expression=t}f.prototype.toString=function(){return this.expression.toString()};function x(t,e,r){e in t||(t[e]=r)}f.prototype.evaluate=function(t){var e=t.expressionContextNode;if(!(F(e)||W(e)))throw new Error("Context node does not appear to be a valid DOM node.");return t.contextNode=t.expressionContextNode,t.contextSize=1,t.contextPosition=1,t.isHtml&&(x(t,"caseInsensitive",!0),x(t,"allowAnyNamespaceForNoPrefix",!0)),x(t,"caseInsensitive",!1),this.expression.evaluate(t)},f.XML_NAMESPACE_URI="http://www.w3.org/XML/1998/namespace",f.XMLNS_NAMESPACE_URI="http://www.w3.org/2000/xmlns/",N.prototype=new Object,N.prototype.constructor=N,N.superclass=Object.prototype;function N(){}N.prototype.init=function(){},N.prototype.toString=function(){return"<Expression>"},N.prototype.evaluate=function(t){throw new Error("Could not evaluate expression.")},U.prototype=new N,U.prototype.constructor=U,U.superclass=N.prototype;function U(t){arguments.length>0&&this.init(t)}U.prototype.init=function(t){this.rhs=t},L.prototype=new U,L.prototype.constructor=L,L.superclass=U.prototype;function L(t){arguments.length>0&&this.init(t)}L.prototype.init=function(t){L.superclass.init.call(this,t)},L.prototype.evaluate=function(t){return this.rhs.evaluate(t).number().negate()},L.prototype.toString=function(){return"-"+this.rhs.toString()},C.prototype=new N,C.prototype.constructor=C,C.superclass=N.prototype;function C(t,e){arguments.length>0&&this.init(t,e)}C.prototype.init=function(t,e){this.lhs=t,this.rhs=e},_.prototype=new C,_.prototype.constructor=_,_.superclass=C.prototype;function _(t,e){arguments.length>0&&this.init(t,e)}_.prototype.init=function(t,e){_.superclass.init.call(this,t,e)},_.prototype.toString=function(){return"("+this.lhs.toString()+" or "+this.rhs.toString()+")"},_.prototype.evaluate=function(t){var e=this.lhs.evaluate(t).bool();return e.booleanValue()?e:this.rhs.evaluate(t).bool()},H.prototype=new C,H.prototype.constructor=H,H.superclass=C.prototype;function H(t,e){arguments.length>0&&this.init(t,e)}H.prototype.init=function(t,e){H.superclass.init.call(this,t,e)},H.prototype.toString=function(){return"("+this.lhs.toString()+" and "+this.rhs.toString()+")"},H.prototype.evaluate=function(t){var e=this.lhs.evaluate(t).bool();return e.booleanValue()?this.rhs.evaluate(t).bool():e},P.prototype=new C,P.prototype.constructor=P,P.superclass=C.prototype;function P(t,e){arguments.length>0&&this.init(t,e)}P.prototype.init=function(t,e){P.superclass.init.call(this,t,e)},P.prototype.toString=function(){return"("+this.lhs.toString()+" = "+this.rhs.toString()+")"},P.prototype.evaluate=function(t){return this.lhs.evaluate(t).equals(this.rhs.evaluate(t))},M.prototype=new C,M.prototype.constructor=M,M.superclass=C.prototype;function M(t,e){arguments.length>0&&this.init(t,e)}M.prototype.init=function(t,e){M.superclass.init.call(this,t,e)},M.prototype.toString=function(){return"("+this.lhs.toString()+" != "+this.rhs.toString()+")"},M.prototype.evaluate=function(t){return this.lhs.evaluate(t).notequal(this.rhs.evaluate(t))},k.prototype=new C,k.prototype.constructor=k,k.superclass=C.prototype;function k(t,e){arguments.length>0&&this.init(t,e)}k.prototype.init=function(t,e){k.superclass.init.call(this,t,e)},k.prototype.evaluate=function(t){return this.lhs.evaluate(t).lessthan(this.rhs.evaluate(t))},k.prototype.toString=function(){return"("+this.lhs.toString()+" < "+this.rhs.toString()+")"},nt.prototype=new C,nt.prototype.constructor=nt,nt.superclass=C.prototype;function nt(t,e){arguments.length>0&&this.init(t,e)}nt.prototype.init=function(t,e){nt.superclass.init.call(this,t,e)},nt.prototype.evaluate=function(t){return this.lhs.evaluate(t).greaterthan(this.rhs.evaluate(t))},nt.prototype.toString=function(){return"("+this.lhs.toString()+" > "+this.rhs.toString()+")"},Q.prototype=new C,Q.prototype.constructor=Q,Q.superclass=C.prototype;function Q(t,e){arguments.length>0&&this.init(t,e)}Q.prototype.init=function(t,e){Q.superclass.init.call(this,t,e)},Q.prototype.evaluate=function(t){return this.lhs.evaluate(t).lessthanorequal(this.rhs.evaluate(t))},Q.prototype.toString=function(){return"("+this.lhs.toString()+" <= "+this.rhs.toString()+")"},ut.prototype=new C,ut.prototype.constructor=ut,ut.superclass=C.prototype;function ut(t,e){arguments.length>0&&this.init(t,e)}ut.prototype.init=function(t,e){ut.superclass.init.call(this,t,e)},ut.prototype.evaluate=function(t){return this.lhs.evaluate(t).greaterthanorequal(this.rhs.evaluate(t))},ut.prototype.toString=function(){return"("+this.lhs.toString()+" >= "+this.rhs.toString()+")"},wt.prototype=new C,wt.prototype.constructor=wt,wt.superclass=C.prototype;function wt(t,e){arguments.length>0&&this.init(t,e)}wt.prototype.init=function(t,e){wt.superclass.init.call(this,t,e)},wt.prototype.evaluate=function(t){return this.lhs.evaluate(t).number().plus(this.rhs.evaluate(t).number())},wt.prototype.toString=function(){return"("+this.lhs.toString()+" + "+this.rhs.toString()+")"},lt.prototype=new C,lt.prototype.constructor=lt,lt.superclass=C.prototype;function lt(t,e){arguments.length>0&&this.init(t,e)}lt.prototype.init=function(t,e){lt.superclass.init.call(this,t,e)},lt.prototype.evaluate=function(t){return this.lhs.evaluate(t).number().minus(this.rhs.evaluate(t).number())},lt.prototype.toString=function(){return"("+this.lhs.toString()+" - "+this.rhs.toString()+")"},z.prototype=new C,z.prototype.constructor=z,z.superclass=C.prototype;function z(t,e){arguments.length>0&&this.init(t,e)}z.prototype.init=function(t,e){z.superclass.init.call(this,t,e)},z.prototype.evaluate=function(t){return this.lhs.evaluate(t).number().multiply(this.rhs.evaluate(t).number())},z.prototype.toString=function(){return"("+this.lhs.toString()+" * "+this.rhs.toString()+")"},vt.prototype=new C,vt.prototype.constructor=vt,vt.superclass=C.prototype;function vt(t,e){arguments.length>0&&this.init(t,e)}vt.prototype.init=function(t,e){vt.superclass.init.call(this,t,e)},vt.prototype.evaluate=function(t){return this.lhs.evaluate(t).number().div(this.rhs.evaluate(t).number())},vt.prototype.toString=function(){return"("+this.lhs.toString()+" div "+this.rhs.toString()+")"},xt.prototype=new C,xt.prototype.constructor=xt,xt.superclass=C.prototype;function xt(t,e){arguments.length>0&&this.init(t,e)}xt.prototype.init=function(t,e){xt.superclass.init.call(this,t,e)},xt.prototype.evaluate=function(t){return this.lhs.evaluate(t).number().mod(this.rhs.evaluate(t).number())},xt.prototype.toString=function(){return"("+this.lhs.toString()+" mod "+this.rhs.toString()+")"},ot.prototype=new C,ot.prototype.constructor=ot,ot.superclass=C.prototype;function ot(t,e){arguments.length>0&&this.init(t,e)}ot.prototype.init=function(t,e){ot.superclass.init.call(this,t,e)},ot.prototype.evaluate=function(t){return this.lhs.evaluate(t).nodeset().union(this.rhs.evaluate(t).nodeset())},ot.prototype.toString=function(){return at(X,[this.lhs,this.rhs]).join(" | ")},q.prototype=new N,q.prototype.constructor=q,q.superclass=N.prototype;function q(t,e,r){arguments.length>0&&this.init(t,e,r)}q.prototype.init=function(t,e,r){q.superclass.init.call(this),this.filter=t,this.filterPredicates=e,this.locationPath=r};function Mt(t){for(;t&&t.parentNode;)t=t.parentNode;return t}var Ft=function(t,e,r,a){if(t.length===0)return r;var o=e.extend({});return mt(function(u,D){return o.contextSize=u.length,St(function(Z,tt){return o.contextNode=Z,o.contextPosition=tt+1,q.predicateMatches(D,o)},u)},bt(r,a),t)};q.getRoot=function(t,e){var r=e[0];if(r&&r.nodeType===b.DOCUMENT_NODE)return r;if(t.virtualRoot)return t.virtualRoot;if(!r)throw new Error("Context node not found when determining document root.");var a=r.ownerDocument;if(a)return a;for(var o=r;o.parentNode!=null;)o=o.parentNode;return o};var Ht=function(t){var e=String(t.name);return e==="xmlns"?"":e.substring(0,6)==="xmlns:"?e.substring(6,e.length):null};q.applyStep=function(t,e,r){if(!r)throw new Error("Context node not found when evaluating XPath step: "+t);var a=[];switch(e.contextNode=r,t.axis){case c.ANCESTOR:if(e.contextNode===e.virtualRoot)break;var o;for(e.contextNode.nodeType==b.ATTRIBUTE_NODE?o=q.getOwnerElement(e.contextNode):o=e.contextNode.parentNode;o!=null&&(t.nodeTest.matches(o,e)&&a.push(o),o!==e.virtualRoot);)o=o.parentNode;break;case c.ANCESTORORSELF:for(var o=e.contextNode;o!=null&&(t.nodeTest.matches(o,e)&&a.push(o),o!==e.virtualRoot);o=o.nodeType==b.ATTRIBUTE_NODE?q.getOwnerElement(o):o.parentNode);break;case c.ATTRIBUTE:var u=e.contextNode.attributes;if(u!=null)for(var D=0;D<u.length;D++){var o=u.item(D);t.nodeTest.matches(o,e)&&a.push(o)}break;case c.CHILD:for(var o=e.contextNode.firstChild;o!=null;o=o.nextSibling)t.nodeTest.matches(o,e)&&a.push(o);break;case c.DESCENDANT:for(var B=[e.contextNode.firstChild];B.length>0;)for(var o=B.pop();o!=null;)t.nodeTest.matches(o,e)&&a.push(o),o.firstChild!=null?(B.push(o.nextSibling),o=o.firstChild):o=o.nextSibling;break;case c.DESCENDANTORSELF:t.nodeTest.matches(e.contextNode,e)&&a.push(e.contextNode);for(var B=[e.contextNode.firstChild];B.length>0;)for(var o=B.pop();o!=null;)t.nodeTest.matches(o,e)&&a.push(o),o.firstChild!=null?(B.push(o.nextSibling),o=o.firstChild):o=o.nextSibling;break;case c.FOLLOWING:if(e.contextNode===e.virtualRoot)break;var B=[];e.contextNode.firstChild!=null?B.unshift(e.contextNode.firstChild):B.unshift(e.contextNode.nextSibling);for(var o=e.contextNode.parentNode;o!=null&&o.nodeType!=b.DOCUMENT_NODE&&o!==e.virtualRoot;o=o.parentNode)B.unshift(o.nextSibling);do for(var o=B.pop();o!=null;)t.nodeTest.matches(o,e)&&a.push(o),o.firstChild!=null?(B.push(o.nextSibling),o=o.firstChild):o=o.nextSibling;while(B.length>0);break;case c.FOLLOWINGSIBLING:if(e.contextNode===e.virtualRoot)break;for(var o=e.contextNode.nextSibling;o!=null;o=o.nextSibling)t.nodeTest.matches(o,e)&&a.push(o);break;case c.NAMESPACE:var Z={};if(e.contextNode.nodeType==b.ELEMENT_NODE){Z.xml=new ct("xml",null,f.XML_NAMESPACE_URI,e.contextNode);for(var o=e.contextNode;o!=null&&o.nodeType==b.ELEMENT_NODE;o=o.parentNode)for(var D=0;D<o.attributes.length;D++){var tt=o.attributes.item(D),w=Ht(tt);w!=null&&Z[w]==null&&(Z[w]=new ct(w,tt,tt.value,e.contextNode))}for(var w in Z){var r=Z[w];t.nodeTest.matches(r,e)&&a.push(r)}}break;case c.PARENT:o=null,e.contextNode!==e.virtualRoot&&(e.contextNode.nodeType==b.ATTRIBUTE_NODE?o=q.getOwnerElement(e.contextNode):o=e.contextNode.parentNode),o!=null&&t.nodeTest.matches(o,e)&&a.push(o);break;case c.PRECEDING:var B;e.virtualRoot!=null?B=[e.virtualRoot]:B=[Mt(e.contextNode)];t:for(;B.length>0;)for(var o=B.pop();o!=null;){if(o==e.contextNode)break t;t.nodeTest.matches(o,e)&&a.unshift(o),o.firstChild!=null?(B.push(o.nextSibling),o=o.firstChild):o=o.nextSibling}break;case c.PRECEDINGSIBLING:if(e.contextNode===e.virtualRoot)break;for(var o=e.contextNode.previousSibling;o!=null;o=o.previousSibling)t.nodeTest.matches(o,e)&&a.push(o);break;case c.SELF:t.nodeTest.matches(e.contextNode,e)&&a.push(e.contextNode);break}return a};function Yt(t,e,r){return Ft(t.predicates,e,q.applyStep(t,e,r),y(Vt,t.axis))}function Nt(t,e,r){return Ct(at(Yt.bind(null,r,t),e))}q.applySteps=function(t,e,r){return mt(Nt.bind(null,e),r,t)},q.prototype.applyFilter=function(t,e){if(!this.filter)return{nodes:[t.contextNode]};var r=this.filter.evaluate(t);if(!S.instance_of(r,E)){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");return{nonNodes:r}}return{nodes:Ft(this.filterPredicates||[],e,r.toUnsortedArray(),!1)}},q.applyLocationPath=function(t,e,r){if(!t)return r;var a=t.absolute?[q.getRoot(e,r)]:r;return q.applySteps(t.steps,e,a)},q.prototype.evaluate=function(t){var e=ht(new Dt,t),r=this.applyFilter(t,e);if("nonNodes"in r)return r.nonNodes;var a=new E;return a.addArray(q.applyLocationPath(this.locationPath,e,r.nodes)),a},q.predicateMatches=function(t,e){var r=t.evaluate(e);return S.instance_of(r,R)?e.contextPosition===r.numberValue():r.booleanValue()},q.predicateString=function(t){return j("[","]",t.toString())},q.predicatesString=function(t){return J("",at(q.predicateString,t))},q.prototype.toString=function(){if(this.filter!=null){var t=X(this.filter);return S.instance_of(this.filter,v)?j("'","'",t):this.filterPredicates!=null&&this.filterPredicates.length?j("(",")",t)+q.predicatesString(this.filterPredicates):this.locationPath!=null?t+(this.locationPath.absolute?"":"/")+X(this.locationPath):t}return X(this.locationPath)},q.getOwnerElement=function(t){if(t.ownerElement)return t.ownerElement;try{if(t.selectSingleNode)return t.selectSingleNode("..")}catch{}for(var e=t.nodeType==b.DOCUMENT_NODE?t:t.ownerDocument,r=e.getElementsByTagName("*"),a=0;a<r.length;a++)for(var o=r.item(a),u=o.attributes,D=0;D<u.length;D++){var Z=u.item(D);if(Z===t)return o}return null},At.prototype=new Object,At.prototype.constructor=At,At.superclass=Object.prototype;function At(t,e){arguments.length>0&&this.init(t,e)}At.prototype.init=function(t,e){this.absolute=t,this.steps=e},At.prototype.toString=function(){return(this.absolute?"/":"")+at(X,this.steps).join("/")},c.prototype=new Object,c.prototype.constructor=c,c.superclass=Object.prototype;function c(t,e,r){arguments.length>0&&this.init(t,e,r)}c.prototype.init=function(t,e,r){this.axis=t,this.nodeTest=e,this.predicates=r},c.prototype.toString=function(){return c.STEPNAMES[this.axis]+"::"+this.nodeTest.toString()+q.predicatesString(this.predicates)},c.ANCESTOR=0,c.ANCESTORORSELF=1,c.ATTRIBUTE=2,c.CHILD=3,c.DESCENDANT=4,c.DESCENDANTORSELF=5,c.FOLLOWING=6,c.FOLLOWINGSIBLING=7,c.NAMESPACE=8,c.PARENT=9,c.PRECEDING=10,c.PRECEDINGSIBLING=11,c.SELF=12,c.STEPNAMES=mt(function(t,e){return t[e[0]]=e[1],t},{},[[c.ANCESTOR,"ancestor"],[c.ANCESTORORSELF,"ancestor-or-self"],[c.ATTRIBUTE,"attribute"],[c.CHILD,"child"],[c.DESCENDANT,"descendant"],[c.DESCENDANTORSELF,"descendant-or-self"],[c.FOLLOWING,"following"],[c.FOLLOWINGSIBLING,"following-sibling"],[c.NAMESPACE,"namespace"],[c.PARENT,"parent"],[c.PRECEDING,"preceding"],[c.PRECEDINGSIBLING,"preceding-sibling"],[c.SELF,"self"]]);var Vt=[c.ANCESTOR,c.ANCESTORORSELF,c.PARENT,c.PRECEDING,c.PRECEDINGSIBLING];g.prototype=new Object,g.prototype.constructor=g,g.superclass=Object.prototype;function g(t,e){arguments.length>0&&this.init(t,e)}g.prototype.init=function(t,e){this.type=t,this.value=e},g.prototype.toString=function(){return"<unknown nodetest type>"},g.prototype.matches=function(t,e){console.warn("unknown node test type")},g.NAMETESTANY=0,g.NAMETESTPREFIXANY=1,g.NAMETESTQNAME=2,g.COMMENT=3,g.TEXT=4,g.PI=5,g.NODE=6,g.isNodeType=function(t){return function(e){return y(t,e.nodeType)}},g.makeNodeTestType=function(t,e,r){var a=r||function(){};return a.prototype=new g(t),a.prototype.constructor=a,ht(a.prototype,e),a},g.makeNodeTypeTest=function(t,e,r){return new(g.makeNodeTestType(t,{matches:g.isNodeType(e),toString:$(r)}))},g.hasPrefix=function(t){return t.prefix||(t.nodeName||t.tagName).indexOf(":")!==-1},g.isElementOrAttribute=g.isNodeType([1,2]),g.nameSpaceMatches=function(t,e,r){var a=r.namespaceURI||"";if(!t)return!a||e.allowAnyNamespaceForNoPrefix&&!g.hasPrefix(r);var o=e.namespaceResolver.getNamespace(t,e.expressionContextNode);if(o==null)throw new Error("Cannot resolve QName "+t);return o===a},g.localNameMatches=function(t,e,r){var a=r.localName||r.nodeName;return e.caseInsensitive?t.toLowerCase()===a.toLowerCase():t===a},g.NameTestPrefixAny=g.makeNodeTestType(g.NAMETESTPREFIXANY,{matches:function(t,e){return g.isElementOrAttribute(t)&&g.nameSpaceMatches(this.prefix,e,t)},toString:function(){return this.prefix+":*"}},function(e){this.prefix=e}),g.NameTestQName=g.makeNodeTestType(g.NAMETESTQNAME,{matches:function(t,e){return g.isNodeType([b.ELEMENT_NODE,b.ATTRIBUTE_NODE,b.NAMESPACE_NODE])(t)&&g.nameSpaceMatches(this.prefix,e,t)&&g.localNameMatches(this.localName,e,t)},toString:function(){return this.name}},function(e){var r=e.split(":");this.name=e,this.prefix=r.length>1?r[0]:null,this.localName=r[r.length>1?1:0]}),g.PITest=g.makeNodeTestType(g.PI,{matches:function(t,e){return g.isNodeType([b.PROCESSING_INSTRUCTION_NODE])(t)&&(t.target||t.nodeName)===this.name},toString:function(){return j('processing-instruction("','")',this.name)}},function(t){this.name=t}),g.nameTestAny=g.makeNodeTypeTest(g.NAMETESTANY,[b.ELEMENT_NODE,b.ATTRIBUTE_NODE,b.NAMESPACE_NODE],"*"),g.textTest=g.makeNodeTypeTest(g.TEXT,[b.TEXT_NODE,b.CDATA_SECTION_NODE],"text()"),g.commentTest=g.makeNodeTypeTest(g.COMMENT,[b.COMMENT_NODE],"comment()"),g.nodeTest=g.makeNodeTypeTest(g.NODE,[b.ELEMENT_NODE,b.ATTRIBUTE_NODE,b.TEXT_NODE,b.CDATA_SECTION_NODE,b.PROCESSING_INSTRUCTION_NODE,b.COMMENT_NODE,b.DOCUMENT_NODE],"node()"),g.anyPiTest=g.makeNodeTypeTest(g.PI,[b.PROCESSING_INSTRUCTION_NODE],"processing-instruction()"),Ot.prototype=new N,Ot.prototype.constructor=Ot,Ot.superclass=N.prototype;function Ot(t){arguments.length>0&&this.init(t)}Ot.prototype.init=function(t){this.variable=t},Ot.prototype.toString=function(){return"$"+this.variable},Ot.prototype.evaluate=function(t){var e=S.resolveQName(this.variable,t.namespaceResolver,t.contextNode,!1);if(e[0]==null)throw new Error("Cannot resolve QName "+fn);var r=t.variableResolver.getVariable(e[1],e[0]);if(!r)throw _t.fromMessage("Undeclared variable: "+this.toString());return r},dt.prototype=new N,dt.prototype.constructor=dt,dt.superclass=N.prototype;function dt(t,e){arguments.length>0&&this.init(t,e)}dt.prototype.init=function(t,e){this.functionName=t,this.arguments=e},dt.prototype.toString=function(){for(var t=this.functionName+"(",e=0;e<this.arguments.length;e++)e>0&&(t+=", "),t+=this.arguments[e].toString();return t+")"},dt.prototype.evaluate=function(t){var e=st.getFunctionFromContext(this.functionName,t);if(!e)throw new Error("Unknown function "+this.functionName);var r=[t].concat(this.arguments);return e.apply(t.functionResolver.thisArg,r)};var G=new Object;G.equals=function(t,e){return t.equals(e)},G.notequal=function(t,e){return t.notequal(e)},G.lessthan=function(t,e){return t.lessthan(e)},G.greaterthan=function(t,e){return t.greaterthan(e)},G.lessthanorequal=function(t,e){return t.lessthanorequal(e)},G.greaterthanorequal=function(t,e){return t.greaterthanorequal(e)},v.prototype=new N,v.prototype.constructor=v,v.superclass=N.prototype;function v(t){arguments.length>0&&this.init(t)}v.prototype.init=function(t){this.str=String(t)},v.prototype.toString=function(){return this.str},v.prototype.evaluate=function(t){return this},v.prototype.string=function(){return this},v.prototype.number=function(){return new R(this.str)},v.prototype.bool=function(){return new s(this.str)},v.prototype.nodeset=function(){throw new Error("Cannot convert string to nodeset")},v.prototype.stringValue=function(){return this.str},v.prototype.numberValue=function(){return this.number().numberValue()},v.prototype.booleanValue=function(){return this.bool().booleanValue()},v.prototype.equals=function(t){return S.instance_of(t,s)?this.bool().equals(t):S.instance_of(t,R)?this.number().equals(t):S.instance_of(t,E)?t.compareWithString(this,G.equals):new s(this.str==t.str)},v.prototype.notequal=function(t){return S.instance_of(t,s)?this.bool().notequal(t):S.instance_of(t,R)?this.number().notequal(t):S.instance_of(t,E)?t.compareWithString(this,G.notequal):new s(this.str!=t.str)},v.prototype.lessthan=function(t){return this.number().lessthan(t)},v.prototype.greaterthan=function(t){return this.number().greaterthan(t)},v.prototype.lessthanorequal=function(t){return this.number().lessthanorequal(t)},v.prototype.greaterthanorequal=function(t){return this.number().greaterthanorequal(t)},R.prototype=new N,R.prototype.constructor=R,R.superclass=N.prototype;function R(t){arguments.length>0&&this.init(t)}R.prototype.init=function(t){this.num=typeof t=="string"?this.parse(t):Number(t)},R.prototype.numberFormat=/^\\s*-?[0-9]*\\.?[0-9]+\\s*$/,R.prototype.parse=function(t){return this.numberFormat.test(t)?parseFloat(t):Number.NaN};function n(t){for(var e=t.split("e-"),r=e[0].replace(".",""),a=Number(e[1]),o=0;o<a-1;o+=1)r="0"+r;return"0."+r}function i(t){for(var e=t.split("e"),r=e[0].replace(".",""),a=Number(e[1]),o=a+1-r.length,u=0;u<o;u+=1)r+="0";return r}R.prototype.toString=function(){var t=this.num.toString();return t.indexOf("e-")!==-1?n(t):t.indexOf("e")!==-1?i(t):t},R.prototype.evaluate=function(t){return this},R.prototype.string=function(){return new v(this.toString())},R.prototype.number=function(){return this},R.prototype.bool=function(){return new s(this.num)},R.prototype.nodeset=function(){throw new Error("Cannot convert number to nodeset")},R.prototype.stringValue=function(){return this.string().stringValue()},R.prototype.numberValue=function(){return this.num},R.prototype.booleanValue=function(){return this.bool().booleanValue()},R.prototype.negate=function(){return new R(-this.num)},R.prototype.equals=function(t){return S.instance_of(t,s)?this.bool().equals(t):S.instance_of(t,v)?this.equals(t.number()):S.instance_of(t,E)?t.compareWithNumber(this,G.equals):new s(this.num==t.num)},R.prototype.notequal=function(t){return S.instance_of(t,s)?this.bool().notequal(t):S.instance_of(t,v)?this.notequal(t.number()):S.instance_of(t,E)?t.compareWithNumber(this,G.notequal):new s(this.num!=t.num)},R.prototype.lessthan=function(t){return S.instance_of(t,E)?t.compareWithNumber(this,G.greaterthan):S.instance_of(t,s)||S.instance_of(t,v)?this.lessthan(t.number()):new s(this.num<t.num)},R.prototype.greaterthan=function(t){return S.instance_of(t,E)?t.compareWithNumber(this,G.lessthan):S.instance_of(t,s)||S.instance_of(t,v)?this.greaterthan(t.number()):new s(this.num>t.num)},R.prototype.lessthanorequal=function(t){return S.instance_of(t,E)?t.compareWithNumber(this,G.greaterthanorequal):S.instance_of(t,s)||S.instance_of(t,v)?this.lessthanorequal(t.number()):new s(this.num<=t.num)},R.prototype.greaterthanorequal=function(t){return S.instance_of(t,E)?t.compareWithNumber(this,G.lessthanorequal):S.instance_of(t,s)||S.instance_of(t,v)?this.greaterthanorequal(t.number()):new s(this.num>=t.num)},R.prototype.plus=function(t){return new R(this.num+t.num)},R.prototype.minus=function(t){return new R(this.num-t.num)},R.prototype.multiply=function(t){return new R(this.num*t.num)},R.prototype.div=function(t){return new R(this.num/t.num)},R.prototype.mod=function(t){return new R(this.num%t.num)},s.prototype=new N,s.prototype.constructor=s,s.superclass=N.prototype;function s(t){arguments.length>0&&this.init(t)}s.prototype.init=function(t){this.b=!!t},s.prototype.toString=function(){return this.b.toString()},s.prototype.evaluate=function(t){return this},s.prototype.string=function(){return new v(this.b)},s.prototype.number=function(){return new R(this.b)},s.prototype.bool=function(){return this},s.prototype.nodeset=function(){throw new Error("Cannot convert boolean to nodeset")},s.prototype.stringValue=function(){return this.string().stringValue()},s.prototype.numberValue=function(){return this.number().numberValue()},s.prototype.booleanValue=function(){return this.b},s.prototype.not=function(){return new s(!this.b)},s.prototype.equals=function(t){return S.instance_of(t,v)||S.instance_of(t,R)?this.equals(t.bool()):S.instance_of(t,E)?t.compareWithBoolean(this,G.equals):new s(this.b==t.b)},s.prototype.notequal=function(t){return S.instance_of(t,v)||S.instance_of(t,R)?this.notequal(t.bool()):S.instance_of(t,E)?t.compareWithBoolean(this,G.notequal):new s(this.b!=t.b)},s.prototype.lessthan=function(t){return this.number().lessthan(t)},s.prototype.greaterthan=function(t){return this.number().greaterthan(t)},s.prototype.lessthanorequal=function(t){return this.number().lessthanorequal(t)},s.prototype.greaterthanorequal=function(t){return this.number().greaterthanorequal(t)},s.true_=new s(!0),s.false_=new s(!1),p.prototype=new Object,p.prototype.constructor=p,p.superclass=Object.prototype;function p(t){this.init(t)}p.prototype.init=function(t){this.left=null,this.right=null,this.node=t,this.depth=1},p.prototype.balance=function(){var t=this.left==null?0:this.left.depth,e=this.right==null?0:this.right.depth;if(t>e+1){var r=this.left.left==null?0:this.left.left.depth,a=this.left.right==null?0:this.left.right.depth;r<a&&this.left.rotateRR(),this.rotateLL()}else if(t+1<e){var o=this.right.right==null?0:this.right.right.depth,u=this.right.left==null?0:this.right.left.depth;u>o&&this.right.rotateLL(),this.rotateRR()}},p.prototype.rotateLL=function(){var t=this.node,e=this.right;this.node=this.left.node,this.right=this.left,this.left=this.left.left,this.right.left=this.right.right,this.right.right=e,this.right.node=t,this.right.updateInNewLocation(),this.updateInNewLocation()},p.prototype.rotateRR=function(){var t=this.node,e=this.left;this.node=this.right.node,this.left=this.right,this.right=this.right.right,this.left.right=this.left.left,this.left.left=e,this.left.node=t,this.left.updateInNewLocation(),this.updateInNewLocation()},p.prototype.updateInNewLocation=function(){this.getDepthFromChildren()},p.prototype.getDepthFromChildren=function(){this.depth=this.node==null?0:1,this.left!=null&&(this.depth=this.left.depth+1),this.right!=null&&this.depth<=this.right.depth&&(this.depth=this.right.depth+1)};function T(t,e){if(t===e)return 0;if(t.compareDocumentPosition){var r=t.compareDocumentPosition(e);return r&1||r&10?1:r&20?-1:0}for(var a=0,o=0,u=t;u!=null;u=u.parentNode||u.ownerElement)a++;for(var D=e;D!=null;D=D.parentNode||D.ownerElement)o++;if(a>o){for(;a>o;)t=t.parentNode||t.ownerElement,a--;if(t===e)return 1}else if(o>a){for(;o>a;)e=e.parentNode||e.ownerElement,o--;if(t===e)return-1}for(var Z=t.parentNode||t.ownerElement,tt=e.parentNode||e.ownerElement;Z!==tt;)t=Z,e=tt,Z=t.parentNode||t.ownerElement,tt=e.parentNode||e.ownerElement;var w=gt(t),B=gt(e);if(w&&!B)return-1;if(!w&&B)return 1;if(t.isXPathNamespace){if(t.nodeValue===f.XML_NAMESPACE_URI||!e.isXPathNamespace)return-1;if(e.nodeValue===f.XML_NAMESPACE_URI)return 1}else if(e.isXPathNamespace)return 1;if(Z)for(var Lt=w?Z.attributes:Z.childNodes,kt=Lt.length,jt=t.baseNode||t,qt=e.baseNode||e,Qt=0;Qt<kt;Qt+=1){var Kt=Lt[Qt];if(Kt===jt)return-1;if(Kt===qt)return 1}throw new Error("Unexpected: could not determine node order")}p.prototype.add=function(t){if(t===this.node)return!1;var e=T(t,this.node),r=!1;return e==-1?this.left==null?(this.left=new p(t),r=!0):(r=this.left.add(t),r&&this.balance()):e==1&&(this.right==null?(this.right=new p(t),r=!0):(r=this.right.add(t),r&&this.balance())),r&&this.getDepthFromChildren(),r},E.prototype=new N,E.prototype.constructor=E,E.superclass=N.prototype;function E(){this.init()}E.prototype.init=function(){this.tree=null,this.nodes=[],this.size=0},E.prototype.toString=function(){var t=this.first();return t==null?"":this.stringForNode(t)},E.prototype.evaluate=function(t){return this},E.prototype.string=function(){return new v(this.toString())},E.prototype.stringValue=function(){return this.toString()},E.prototype.number=function(){return new R(this.string())},E.prototype.numberValue=function(){return Number(this.string())},E.prototype.bool=function(){return new s(this.booleanValue())},E.prototype.booleanValue=function(){return!!this.size},E.prototype.nodeset=function(){return this},E.prototype.stringForNode=function(t){return t.nodeType==b.DOCUMENT_NODE||t.nodeType==b.ELEMENT_NODE||t.nodeType===b.DOCUMENT_FRAGMENT_NODE?this.stringForContainerNode(t):t.nodeType===b.ATTRIBUTE_NODE?t.value||t.nodeValue:t.isNamespaceNode?t.namespace:t.nodeValue},E.prototype.stringForContainerNode=function(t){for(var e="",r=t.firstChild;r!=null;r=r.nextSibling){var a=r.nodeType;(a===1||a===3||a===4||a===9||a===11)&&(e+=this.stringForNode(r))}return e},E.prototype.buildTree=function(){if(!this.tree&&this.nodes.length){this.tree=new p(this.nodes[0]);for(var t=1;t<this.nodes.length;t+=1)this.tree.add(this.nodes[t])}return this.tree},E.prototype.first=function(){var t=this.buildTree();if(t==null)return null;for(;t.left!=null;)t=t.left;return t.node},E.prototype.add=function(t){for(var e=0;e<this.nodes.length;e+=1)if(t===this.nodes[e])return;this.tree=null,this.nodes.push(t),this.size+=1},E.prototype.addArray=function(t){var e=this;pt(function(r){e.add(r)},t)},E.prototype.toArray=function(){var t=[];return this.toArrayRec(this.buildTree(),t),t},E.prototype.toArrayRec=function(t,e){t!=null&&(this.toArrayRec(t.left,e),e.push(t.node),this.toArrayRec(t.right,e))},E.prototype.toUnsortedArray=function(){return this.nodes.slice()},E.prototype.compareWithString=function(t,e){for(var r=this.toUnsortedArray(),a=0;a<r.length;a++){var o=r[a],u=new v(this.stringForNode(o)),D=e(u,t);if(D.booleanValue())return D}return new s(!1)},E.prototype.compareWithNumber=function(t,e){for(var r=this.toUnsortedArray(),a=0;a<r.length;a++){var o=r[a],u=new R(this.stringForNode(o)),D=e(u,t);if(D.booleanValue())return D}return new s(!1)},E.prototype.compareWithBoolean=function(t,e){return e(this.bool(),t)},E.prototype.compareWithNodeSet=function(t,e){for(var r=this.toUnsortedArray(),a=function(Z,tt){return e(tt,Z)},o=0;o<r.length;o++){var u=new v(this.stringForNode(r[o])),D=t.compareWithString(u,a);if(D.booleanValue())return D}return new s(!1)},E.compareWith=it(function(t,e){return S.instance_of(e,v)?this.compareWithString(e,t):S.instance_of(e,R)?this.compareWithNumber(e,t):S.instance_of(e,s)?this.compareWithBoolean(e,t):this.compareWithNodeSet(e,t)}),E.prototype.equals=E.compareWith(G.equals),E.prototype.notequal=E.compareWith(G.notequal),E.prototype.lessthan=E.compareWith(G.lessthan),E.prototype.greaterthan=E.compareWith(G.greaterthan),E.prototype.lessthanorequal=E.compareWith(G.lessthanorequal),E.prototype.greaterthanorequal=E.compareWith(G.greaterthanorequal),E.prototype.union=function(t){var e=new E;return e.addArray(this.toUnsortedArray()),e.addArray(t.toUnsortedArray()),e},ct.prototype=new Object,ct.prototype.constructor=ct,ct.superclass=Object.prototype;function ct(t,e,r,a){this.isXPathNamespace=!0,this.baseNode=e,this.ownerDocument=a.ownerDocument,this.nodeName=t,this.prefix=t,this.localName=t,this.namespaceURI=null,this.nodeValue=r,this.ownerElement=a,this.nodeType=b.NAMESPACE_NODE}ct.prototype.toString=function(){return'{ "'+this.prefix+'", "'+this.namespaceURI+'" }'},Dt.prototype=new Object,Dt.prototype.constructor=Dt,Dt.superclass=Object.prototype;function Dt(t,e,r){this.variableResolver=t??new Tt,this.namespaceResolver=e??new Et,this.functionResolver=r??new st}Dt.prototype.extend=function(t){return ht(new Dt,this,t)},Tt.prototype=new Object,Tt.prototype.constructor=Tt,Tt.superclass=Object.prototype;function Tt(){}Tt.prototype.getVariable=function(t,e){return null},st.prototype=new Object,st.prototype.constructor=st,st.superclass=Object.prototype;function st(t){this.thisArg=t??I,this.functions=new Object,this.addStandardFunctions()}st.prototype.addStandardFunctions=function(){this.functions["{}last"]=I.last,this.functions["{}position"]=I.position,this.functions["{}count"]=I.count,this.functions["{}id"]=I.id,this.functions["{}local-name"]=I.localName,this.functions["{}namespace-uri"]=I.namespaceURI,this.functions["{}name"]=I.name,this.functions["{}string"]=I.string,this.functions["{}concat"]=I.concat,this.functions["{}starts-with"]=I.startsWith,this.functions["{}contains"]=I.contains,this.functions["{}substring-before"]=I.substringBefore,this.functions["{}substring-after"]=I.substringAfter,this.functions["{}substring"]=I.substring,this.functions["{}string-length"]=I.stringLength,this.functions["{}normalize-space"]=I.normalizeSpace,this.functions["{}translate"]=I.translate,this.functions["{}boolean"]=I.boolean_,this.functions["{}not"]=I.not,this.functions["{}true"]=I.true_,this.functions["{}false"]=I.false_,this.functions["{}lang"]=I.lang,this.functions["{}number"]=I.number,this.functions["{}sum"]=I.sum,this.functions["{}floor"]=I.floor,this.functions["{}ceiling"]=I.ceiling,this.functions["{}round"]=I.round},st.prototype.addFunction=function(t,e,r){this.functions["{"+t+"}"+e]=r},st.getFunctionFromContext=function(t,e){var r=S.resolveQName(t,e.namespaceResolver,e.contextNode,!1);if(r[0]===null)throw new Error("Cannot resolve QName "+name);return e.functionResolver.getFunction(r[1],r[0])},st.prototype.getFunction=function(t,e){return this.functions["{"+e+"}"+t]},Et.prototype=new Object,Et.prototype.constructor=Et,Et.superclass=Object.prototype;function Et(){}Et.prototype.getNamespace=function(t,e){if(t=="xml")return f.XML_NAMESPACE_URI;if(t=="xmlns")return f.XMLNS_NAMESPACE_URI;for(e.nodeType==b.DOCUMENT_NODE?e=e.documentElement:e.nodeType==b.ATTRIBUTE_NODE?e=q.getOwnerElement(e):e.nodeType!=b.ELEMENT_NODE&&(e=e.parentNode);e!=null&&e.nodeType==b.ELEMENT_NODE;){for(var r=e.attributes,a=0;a<r.length;a++){var o=r.item(a),u=o.name||o.nodeName;if(u==="xmlns"&&t===""||u==="xmlns:"+t)return String(o.value||o.nodeValue)}e=e.parentNode}return null};var I=new Object;I.last=function(t){if(arguments.length!=1)throw new Error("Function last expects ()");return new R(t.contextSize)},I.position=function(t){if(arguments.length!=1)throw new Error("Function position expects ()");return new R(t.contextPosition)},I.count=function(){var t=arguments[0],e;if(arguments.length!=2||!S.instance_of(e=arguments[1].evaluate(t),E))throw new Error("Function count expects (node-set)");return new R(e.size)},I.id=function(){var t=arguments[0],e;if(arguments.length!=2)throw new Error("Function id expects (object)");e=arguments[1].evaluate(t),S.instance_of(e,E)?e=e.toArray().join(" "):e=e.stringValue();for(var r=e.split(/[\\x0d\\x0a\\x09\\x20]+/),a=new E,o=t.contextNode.nodeType==b.DOCUMENT_NODE?t.contextNode:t.contextNode.ownerDocument,u=0;u<r.length;u++){var D;o.getElementById?D=o.getElementById(r[u]):D=S.getElementById(o,r[u]),D!=null&&a.add(D)}return a},I.localName=function(t,e){var r;if(arguments.length==1)r=t.contextNode;else if(arguments.length==2)r=e.evaluate(t).first();else throw new Error("Function local-name expects (node-set?)");return r==null?new v(""):new v(r.localName||r.baseName||r.target||r.nodeName||"")},I.namespaceURI=function(){var t=arguments[0],e;if(arguments.length==1)e=t.contextNode;else if(arguments.length==2)e=arguments[1].evaluate(t).first();else throw new Error("Function namespace-uri expects (node-set?)");return e==null?new v(""):new v(e.namespaceURI||"")},I.name=function(){var t=arguments[0],e;if(arguments.length==1)e=t.contextNode;else if(arguments.length==2)e=arguments[1].evaluate(t).first();else throw new Error("Function name expects (node-set?)");return e==null?new v(""):e.nodeType==b.ELEMENT_NODE?new v(e.nodeName):e.nodeType==b.ATTRIBUTE_NODE?new v(e.name||e.nodeName):e.nodeType===b.PROCESSING_INSTRUCTION_NODE?new v(e.target||e.nodeName):e.localName==null?new v(""):new v(e.localName)},I.string=function(){var t=arguments[0];if(arguments.length==1)return new v(E.prototype.stringForNode(t.contextNode));if(arguments.length==2)return arguments[1].evaluate(t).string();throw new Error("Function string expects (object?)")},I.concat=function(t){if(arguments.length<3)throw new Error("Function concat expects (string, string[, string]*)");for(var e="",r=1;r<arguments.length;r++)e+=arguments[r].evaluate(t).stringValue();return new v(e)},I.startsWith=function(){var t=arguments[0];if(arguments.length!=3)throw new Error("Function startsWith expects (string, string)");var e=arguments[1].evaluate(t).stringValue(),r=arguments[2].evaluate(t).stringValue();return new s(e.substring(0,r.length)==r)},I.contains=function(){var t=arguments[0];if(arguments.length!=3)throw new Error("Function contains expects (string, string)");var e=arguments[1].evaluate(t).stringValue(),r=arguments[2].evaluate(t).stringValue();return new s(e.indexOf(r)!==-1)},I.substringBefore=function(){var t=arguments[0];if(arguments.length!=3)throw new Error("Function substring-before expects (string, string)");var e=arguments[1].evaluate(t).stringValue(),r=arguments[2].evaluate(t).stringValue();return new v(e.substring(0,e.indexOf(r)))},I.substringAfter=function(){var t=arguments[0];if(arguments.length!=3)throw new Error("Function substring-after expects (string, string)");var e=arguments[1].evaluate(t).stringValue(),r=arguments[2].evaluate(t).stringValue();if(r.length==0)return new v(e);var a=e.indexOf(r);return a==-1?new v(""):new v(e.substring(a+r.length))},I.substring=function(){var t=arguments[0];if(!(arguments.length==3||arguments.length==4))throw new Error("Function substring expects (string, number, number?)");var e=arguments[1].evaluate(t).stringValue(),r=Math.round(arguments[2].evaluate(t).numberValue())-1,a=arguments.length==4?r+Math.round(arguments[3].evaluate(t).numberValue()):void 0;return new v(e.substring(r,a))},I.stringLength=function(){var t=arguments[0],e;if(arguments.length==1)e=E.prototype.stringForNode(t.contextNode);else if(arguments.length==2)e=arguments[1].evaluate(t).stringValue();else throw new Error("Function string-length expects (string?)");return new R(e.length)},I.normalizeSpace=function(){var t=arguments[0],e;if(arguments.length==1)e=E.prototype.stringForNode(t.contextNode);else if(arguments.length==2)e=arguments[1].evaluate(t).stringValue();else throw new Error("Function normalize-space expects (string?)");for(var r=0,a=e.length-1;S.isSpace(e.charCodeAt(a));)a--;for(var o="";r<=a&&S.isSpace(e.charCodeAt(r));)r++;for(;r<=a;)if(S.isSpace(e.charCodeAt(r)))for(o+=" ";r<=a&&S.isSpace(e.charCodeAt(r));)r++;else o+=e.charAt(r),r++;return new v(o)},I.translate=function(t,e,r,a){if(arguments.length!=4)throw new Error("Function translate expects (string, string, string)");var o=e.evaluate(t).stringValue(),u=r.evaluate(t).stringValue(),D=a.evaluate(t).stringValue(),Z=mt(function(w,B,Lt){return B in w||(w[B]=Lt>D.length?"":D[Lt]),w},{},u),tt=J("",at(function(w){return w in Z?Z[w]:w},o));return new v(tt)},I.boolean_=function(){var t=arguments[0];if(arguments.length!=2)throw new Error("Function boolean expects (object)");return arguments[1].evaluate(t).bool()},I.not=function(t,e){if(arguments.length!=2)throw new Error("Function not expects (object)");return e.evaluate(t).bool().not()},I.true_=function(){if(arguments.length!=1)throw new Error("Function true expects ()");return s.true_},I.false_=function(){if(arguments.length!=1)throw new Error("Function false expects ()");return s.false_},I.lang=function(){var t=arguments[0];if(arguments.length!=2)throw new Error("Function lang expects (string)");for(var e,r=t.contextNode;r!=null&&r.nodeType!=b.DOCUMENT_NODE;r=r.parentNode){var a=r.getAttributeNS(f.XML_NAMESPACE_URI,"lang");if(a!=null){e=String(a);break}}if(e==null)return s.false_;var o=arguments[1].evaluate(t).stringValue();return new s(e.substring(0,o.length)==o&&(e.length==o.length||e.charAt(o.length)=="-"))},I.number=function(){var t=arguments[0];if(!(arguments.length==1||arguments.length==2))throw new Error("Function number expects (object?)");return arguments.length==1?new R(E.prototype.stringForNode(t.contextNode)):arguments[1].evaluate(t).number()},I.sum=function(){var t=arguments[0],e;if(arguments.length!=2||!S.instance_of(e=arguments[1].evaluate(t),E))throw new Error("Function sum expects (node-set)");e=e.toUnsortedArray();for(var r=0,a=0;a<e.length;a++)r+=new R(E.prototype.stringForNode(e[a])).numberValue();return new R(r)},I.floor=function(){var t=arguments[0];if(arguments.length!=2)throw new Error("Function floor expects (number)");return new R(Math.floor(arguments[1].evaluate(t).numberValue()))},I.ceiling=function(){var t=arguments[0];if(arguments.length!=2)throw new Error("Function ceiling expects (number)");return new R(Math.ceil(arguments[1].evaluate(t).numberValue()))},I.round=function(){var t=arguments[0];if(arguments.length!=2)throw new Error("Function round expects (number)");return new R(Math.round(arguments[1].evaluate(t).numberValue()))};var S=new Object,gt=function(t){return t&&(t.nodeType===b.ATTRIBUTE_NODE||t.ownerElement||t.isXPathNamespace)};S.splitQName=function(t){var e=t.indexOf(":");return e==-1?[null,t]:[t.substring(0,e),t.substring(e+1)]},S.resolveQName=function(t,e,r,a){var o=S.splitQName(t);return o[0]!=null?o[0]=e.getNamespace(o[0],r):a?(o[0]=e.getNamespace("",r),o[0]==null&&(o[0]="")):o[0]="",o},S.isSpace=function(t){return t==9||t==13||t==10||t==32},S.isLetter=function(t){return t>=65&&t<=90||t>=97&&t<=122||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=255||t>=256&&t<=305||t>=308&&t<=318||t>=321&&t<=328||t>=330&&t<=382||t>=384&&t<=451||t>=461&&t<=496||t>=500&&t<=501||t>=506&&t<=535||t>=592&&t<=680||t>=699&&t<=705||t==902||t>=904&&t<=906||t==908||t>=910&&t<=929||t>=931&&t<=974||t>=976&&t<=982||t==986||t==988||t==990||t==992||t>=994&&t<=1011||t>=1025&&t<=1036||t>=1038&&t<=1103||t>=1105&&t<=1116||t>=1118&&t<=1153||t>=1168&&t<=1220||t>=1223&&t<=1224||t>=1227&&t<=1228||t>=1232&&t<=1259||t>=1262&&t<=1269||t>=1272&&t<=1273||t>=1329&&t<=1366||t==1369||t>=1377&&t<=1414||t>=1488&&t<=1514||t>=1520&&t<=1522||t>=1569&&t<=1594||t>=1601&&t<=1610||t>=1649&&t<=1719||t>=1722&&t<=1726||t>=1728&&t<=1742||t>=1744&&t<=1747||t==1749||t>=1765&&t<=1766||t>=2309&&t<=2361||t==2365||t>=2392&&t<=2401||t>=2437&&t<=2444||t>=2447&&t<=2448||t>=2451&&t<=2472||t>=2474&&t<=2480||t==2482||t>=2486&&t<=2489||t>=2524&&t<=2525||t>=2527&&t<=2529||t>=2544&&t<=2545||t>=2565&&t<=2570||t>=2575&&t<=2576||t>=2579&&t<=2600||t>=2602&&t<=2608||t>=2610&&t<=2611||t>=2613&&t<=2614||t>=2616&&t<=2617||t>=2649&&t<=2652||t==2654||t>=2674&&t<=2676||t>=2693&&t<=2699||t==2701||t>=2703&&t<=2705||t>=2707&&t<=2728||t>=2730&&t<=2736||t>=2738&&t<=2739||t>=2741&&t<=2745||t==2749||t==2784||t>=2821&&t<=2828||t>=2831&&t<=2832||t>=2835&&t<=2856||t>=2858&&t<=2864||t>=2866&&t<=2867||t>=2870&&t<=2873||t==2877||t>=2908&&t<=2909||t>=2911&&t<=2913||t>=2949&&t<=2954||t>=2958&&t<=2960||t>=2962&&t<=2965||t>=2969&&t<=2970||t==2972||t>=2974&&t<=2975||t>=2979&&t<=2980||t>=2984&&t<=2986||t>=2990&&t<=2997||t>=2999&&t<=3001||t>=3077&&t<=3084||t>=3086&&t<=3088||t>=3090&&t<=3112||t>=3114&&t<=3123||t>=3125&&t<=3129||t>=3168&&t<=3169||t>=3205&&t<=3212||t>=3214&&t<=3216||t>=3218&&t<=3240||t>=3242&&t<=3251||t>=3253&&t<=3257||t==3294||t>=3296&&t<=3297||t>=3333&&t<=3340||t>=3342&&t<=3344||t>=3346&&t<=3368||t>=3370&&t<=3385||t>=3424&&t<=3425||t>=3585&&t<=3630||t==3632||t>=3634&&t<=3635||t>=3648&&t<=3653||t>=3713&&t<=3714||t==3716||t>=3719&&t<=3720||t==3722||t==3725||t>=3732&&t<=3735||t>=3737&&t<=3743||t>=3745&&t<=3747||t==3749||t==3751||t>=3754&&t<=3755||t>=3757&&t<=3758||t==3760||t>=3762&&t<=3763||t==3773||t>=3776&&t<=3780||t>=3904&&t<=3911||t>=3913&&t<=3945||t>=4256&&t<=4293||t>=4304&&t<=4342||t==4352||t>=4354&&t<=4355||t>=4357&&t<=4359||t==4361||t>=4363&&t<=4364||t>=4366&&t<=4370||t==4412||t==4414||t==4416||t==4428||t==4430||t==4432||t>=4436&&t<=4437||t==4441||t>=4447&&t<=4449||t==4451||t==4453||t==4455||t==4457||t>=4461&&t<=4462||t>=4466&&t<=4467||t==4469||t==4510||t==4520||t==4523||t>=4526&&t<=4527||t>=4535&&t<=4536||t==4538||t>=4540&&t<=4546||t==4587||t==4592||t==4601||t>=7680&&t<=7835||t>=7840&&t<=7929||t>=7936&&t<=7957||t>=7960&&t<=7965||t>=7968&&t<=8005||t>=8008&&t<=8013||t>=8016&&t<=8023||t==8025||t==8027||t==8029||t>=8031&&t<=8061||t>=8064&&t<=8116||t>=8118&&t<=8124||t==8126||t>=8130&&t<=8132||t>=8134&&t<=8140||t>=8144&&t<=8147||t>=8150&&t<=8155||t>=8160&&t<=8172||t>=8178&&t<=8180||t>=8182&&t<=8188||t==8486||t>=8490&&t<=8491||t==8494||t>=8576&&t<=8578||t>=12353&&t<=12436||t>=12449&&t<=12538||t>=12549&&t<=12588||t>=44032&&t<=55203||t>=19968&&t<=40869||t==12295||t>=12321&&t<=12329},S.isNCNameChar=function(t){return t>=48&&t<=57||t>=1632&&t<=1641||t>=1776&&t<=1785||t>=2406&&t<=2415||t>=2534&&t<=2543||t>=2662&&t<=2671||t>=2790&&t<=2799||t>=2918&&t<=2927||t>=3047&&t<=3055||t>=3174&&t<=3183||t>=3302&&t<=3311||t>=3430&&t<=3439||t>=3664&&t<=3673||t>=3792&&t<=3801||t>=3872&&t<=3881||t==46||t==45||t==95||S.isLetter(t)||t>=768&&t<=837||t>=864&&t<=865||t>=1155&&t<=1158||t>=1425&&t<=1441||t>=1443&&t<=1465||t>=1467&&t<=1469||t==1471||t>=1473&&t<=1474||t==1476||t>=1611&&t<=1618||t==1648||t>=1750&&t<=1756||t>=1757&&t<=1759||t>=1760&&t<=1764||t>=1767&&t<=1768||t>=1770&&t<=1773||t>=2305&&t<=2307||t==2364||t>=2366&&t<=2380||t==2381||t>=2385&&t<=2388||t>=2402&&t<=2403||t>=2433&&t<=2435||t==2492||t==2494||t==2495||t>=2496&&t<=2500||t>=2503&&t<=2504||t>=2507&&t<=2509||t==2519||t>=2530&&t<=2531||t==2562||t==2620||t==2622||t==2623||t>=2624&&t<=2626||t>=2631&&t<=2632||t>=2635&&t<=2637||t>=2672&&t<=2673||t>=2689&&t<=2691||t==2748||t>=2750&&t<=2757||t>=2759&&t<=2761||t>=2763&&t<=2765||t>=2817&&t<=2819||t==2876||t>=2878&&t<=2883||t>=2887&&t<=2888||t>=2891&&t<=2893||t>=2902&&t<=2903||t>=2946&&t<=2947||t>=3006&&t<=3010||t>=3014&&t<=3016||t>=3018&&t<=3021||t==3031||t>=3073&&t<=3075||t>=3134&&t<=3140||t>=3142&&t<=3144||t>=3146&&t<=3149||t>=3157&&t<=3158||t>=3202&&t<=3203||t>=3262&&t<=3268||t>=3270&&t<=3272||t>=3274&&t<=3277||t>=3285&&t<=3286||t>=3330&&t<=3331||t>=3390&&t<=3395||t>=3398&&t<=3400||t>=3402&&t<=3405||t==3415||t==3633||t>=3636&&t<=3642||t>=3655&&t<=3662||t==3761||t>=3764&&t<=3769||t>=3771&&t<=3772||t>=3784&&t<=3789||t>=3864&&t<=3865||t==3893||t==3895||t==3897||t==3902||t==3903||t>=3953&&t<=3972||t>=3974&&t<=3979||t>=3984&&t<=3989||t==3991||t>=3993&&t<=4013||t>=4017&&t<=4023||t==4025||t>=8400&&t<=8412||t==8417||t>=12330&&t<=12335||t==12441||t==12442||t==183||t==720||t==721||t==903||t==1600||t==3654||t==3782||t==12293||t>=12337&&t<=12341||t>=12445&&t<=12446||t>=12540&&t<=12542},S.coalesceText=function(t){for(var e=t.firstChild;e!=null;e=e.nextSibling)if(e.nodeType==b.TEXT_NODE||e.nodeType==b.CDATA_SECTION_NODE){var r=e.nodeValue,a=e;for(e=e.nextSibling;e!=null&&(e.nodeType==b.TEXT_NODE||e.nodeType==b.CDATA_SECTION_NODE);){r+=e.nodeValue;var o=e;e=e.nextSibling,o.parentNode.removeChild(o)}if(a.nodeType==b.CDATA_SECTION_NODE){var u=a.parentNode;if(a.nextSibling==null)u.removeChild(a),u.appendChild(u.ownerDocument.createTextNode(r));else{var D=a.nextSibling;u.removeChild(a),u.insertBefore(u.ownerDocument.createTextNode(r),D)}}else a.nodeValue=r;if(e==null)break}else e.nodeType==b.ELEMENT_NODE&&S.coalesceText(e)},S.instance_of=function(t,e){for(;t!=null;){if(t.constructor===e)return!0;if(t===Object)return!1;t=t.constructor.superclass}return!1},S.getElementById=function(t,e){if(t.nodeType==b.ELEMENT_NODE&&(t.getAttribute("id")==e||t.getAttributeNS(null,"id")==e))return t;for(var r=t.firstChild;r!=null;r=r.nextSibling){var a=S.getElementById(r,e);if(a!=null)return a}return null};var _t=(function(){function t(r,a){var o=a?": "+a.toString():"";switch(r){case e.INVALID_EXPRESSION_ERR:return"Invalid expression"+o;case e.TYPE_ERR:return"Type error"+o}return null}function e(r,a,o){var u=Error.call(this,t(r,a)||o);return u.code=r,u.exception=a,u}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.superclass=Error,e.prototype.toString=function(){return this.message},e.fromMessage=function(r,a){return new e(null,a,r)},e.INVALID_EXPRESSION_ERR=51,e.TYPE_ERR=52,e})();yt.prototype={},yt.prototype.constructor=yt,yt.superclass=Object.prototype;function yt(t,e,r){this.xpath=r.parse(t),this.context=new Dt,this.context.namespaceResolver=new Bt(e)}yt.getOwnerDocument=function(t){return t.nodeType===b.DOCUMENT_NODE?t:t.ownerDocument},yt.detectHtmlDom=function(t){if(!t)return!1;var e=yt.getOwnerDocument(t);try{return e.implementation.hasFeature("HTML","2.0")}catch{return!0}},yt.prototype.evaluate=function(t,e,r){this.context.expressionContextNode=t,this.context.caseInsensitive=yt.detectHtmlDom(t);var a=this.xpath.evaluate(this.context);return new Y(a,e)},Bt.prototype={},Bt.prototype.constructor=Bt,Bt.superclass=Object.prototype;function Bt(t){this.xpathNSResolver=t}Bt.prototype.getNamespace=function(t,e){return this.xpathNSResolver==null?null:this.xpathNSResolver.lookupNamespaceURI(t)},Wt.prototype={},Wt.prototype.constructor=Wt,Wt.superclass=Object.prototype;function Wt(t){this.node=t,this.namespaceResolver=new Et}Wt.prototype.lookupNamespaceURI=function(t){return this.namespaceResolver.getNamespace(t,this.node)},Y.prototype={},Y.prototype.constructor=Y,Y.superclass=Object.prototype;function Y(t,e){switch(e==Y.ANY_TYPE&&(t.constructor===v?e=Y.STRING_TYPE:t.constructor===R?e=Y.NUMBER_TYPE:t.constructor===s?e=Y.BOOLEAN_TYPE:t.constructor===E&&(e=Y.UNORDERED_NODE_ITERATOR_TYPE)),this.resultType=e,e){case Y.NUMBER_TYPE:this.numberValue=t.numberValue();return;case Y.STRING_TYPE:this.stringValue=t.stringValue();return;case Y.BOOLEAN_TYPE:this.booleanValue=t.booleanValue();return;case Y.ANY_UNORDERED_NODE_TYPE:case Y.FIRST_ORDERED_NODE_TYPE:if(t.constructor===E){this.singleNodeValue=t.first();return}break;case Y.UNORDERED_NODE_ITERATOR_TYPE:case Y.ORDERED_NODE_ITERATOR_TYPE:if(t.constructor===E){this.invalidIteratorState=!1,this.nodes=t.toArray(),this.iteratorIndex=0;return}break;case Y.UNORDERED_NODE_SNAPSHOT_TYPE:case Y.ORDERED_NODE_SNAPSHOT_TYPE:if(t.constructor===E){this.nodes=t.toArray(),this.snapshotLength=this.nodes.length;return}break}throw new _t(_t.TYPE_ERR)}Y.prototype.iterateNext=function(){if(this.resultType!=Y.UNORDERED_NODE_ITERATOR_TYPE&&this.resultType!=Y.ORDERED_NODE_ITERATOR_TYPE)throw new _t(_t.TYPE_ERR);return this.nodes[this.iteratorIndex++]},Y.prototype.snapshotItem=function(t){if(this.resultType!=Y.UNORDERED_NODE_SNAPSHOT_TYPE&&this.resultType!=Y.ORDERED_NODE_SNAPSHOT_TYPE)throw new _t(_t.TYPE_ERR);return this.nodes[t]},Y.ANY_TYPE=0,Y.NUMBER_TYPE=1,Y.STRING_TYPE=2,Y.BOOLEAN_TYPE=3,Y.UNORDERED_NODE_ITERATOR_TYPE=4,Y.ORDERED_NODE_ITERATOR_TYPE=5,Y.UNORDERED_NODE_SNAPSHOT_TYPE=6,Y.ORDERED_NODE_SNAPSHOT_TYPE=7,Y.ANY_UNORDERED_NODE_TYPE=8,Y.FIRST_ORDERED_NODE_TYPE=9;function he(t,e){t.createExpression=function(r,a){try{return new yt(r,a,e)}catch(o){throw new _t(_t.INVALID_EXPRESSION_ERR,o)}},t.createNSResolver=function(r){return new Wt(r)},t.evaluate=function(r,a,o,u,D){if(u<0||u>9)throw{code:0,toString:function(){return"Request type not supported"}};return t.createExpression(r,o,e).evaluate(a,u,D)}}try{var ce=!0;try{document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("XPath",null)&&(ce=!1)}catch{}ce&&he(document,new l)}catch{}he(A,new l),(function(){var t=new l,e=new Et,r=new st,a=new Tt;function o(m){return{getNamespace:function(et,Rt){var Ut=m(et,Rt);return Ut||e.getNamespace(et,Rt)}}}function u(m){return o(m.getNamespace.bind(m))}function D(m){return o(function(et){return m[et]})}function Z(m){return m&&typeof m.getNamespace=="function"?u(m):typeof m=="function"?o(m):typeof m=="object"?D(m):e}function tt(m){if(m===null||typeof m>"u"||m instanceof v||m instanceof s||m instanceof R||m instanceof E)return m;switch(typeof m){case"string":return new v(m);case"boolean":return new s(m);case"number":return new R(m)}var et=new E;return et.addArray([].concat(m)),et}function w(m){return function(et){var Rt=Array.prototype.slice.call(arguments,1).map(function(Ue){return Ue.evaluate(et)}),Ut=m.apply(this,[].concat(et,Rt));return tt(Ut)}}function B(m){return{getFunction:function(et,Rt){var Ut=m(et,Rt);return Ut?w(Ut):r.getFunction(et,Rt)}}}function Lt(m){return B(m.getFunction.bind(m))}function kt(m){return B(function(et){return m[et]})}function jt(m){return m&&typeof m.getFunction=="function"?Lt(m):typeof m=="function"?B(m):typeof m=="object"?kt(m):r}function qt(m){return{getVariable:function(et,Rt){var Ut=m(et,Rt);return tt(Ut)}}}function Qt(m){if(m){if(typeof m.getVariable=="function")return qt(m.getVariable.bind(m));if(typeof m=="function")return qt(m);if(typeof m=="object")return qt(function(et){return m[et]})}return a}function Kt(m,et,Rt){m in Rt&&(et[m]=Rt[m])}function Be(m){var et=new Dt;return m?(et.namespaceResolver=Z(m.namespaces),et.functionResolver=jt(m.functions),et.variableResolver=Qt(m.variables),et.expressionContextNode=m.node,Kt("allowAnyNamespaceForNoPrefix",et,m),Kt("isHtml",et,m)):et.namespaceResolver=e,et}function Pe(m,et){var Rt=Be(et);return m.evaluate(Rt)}var Le={evaluate:function(m){return Pe(this.expression,m)},evaluateNumber:function(m){return this.evaluate(m).numberValue()},evaluateString:function(m){return this.evaluate(m).stringValue()},evaluateBoolean:function(m){return this.evaluate(m).booleanValue()},evaluateNodeSet:function(m){return this.evaluate(m).nodeset()},select:function(m){return this.evaluateNodeSet(m).toArray()},select1:function(m){return this.select(m)[0]}};function Me(m){var et=t.parse(m);return Object.create(Le,{expression:{value:et}})}A.parse=Me})(),ht(A,{XPath:f,XPathParser:l,XPathResult:Y,Step:c,PathExpr:q,NodeTest:g,LocationPath:At,OrOperation:_,AndOperation:H,BarOperation:ot,EqualsOperation:P,NotEqualOperation:M,LessThanOperation:k,GreaterThanOperation:nt,LessThanOrEqualOperation:Q,GreaterThanOrEqualOperation:ut,PlusOperation:wt,MinusOperation:lt,MultiplyOperation:z,DivOperation:vt,ModOperation:xt,UnaryMinusOperation:L,FunctionCall:dt,VariableReference:Ot,XPathContext:Dt,XNodeSet:E,XBoolean:s,XString:v,XNumber:R,NamespaceResolver:Et,FunctionResolver:st,VariableResolver:Tt,Utilities:S}),A.select=function(t,e,r){return A.selectWithResolver(t,e,null,r)},A.useNamespaces=function(t){var e={mappings:t||{},lookupNamespaceURI:function(r){return this.mappings[r]}};return function(r,a,o){return A.selectWithResolver(r,a,e,o)}},A.selectWithResolver=function(t,e,r,a){var o=new yt(t,r,new l),u=Y.ANY_TYPE,D=o.evaluate(e,u,null);return D.resultType==Y.STRING_TYPE?D=D.stringValue:D.resultType==Y.NUMBER_TYPE?D=D.numberValue:D.resultType==Y.BOOLEAN_TYPE?D=D.booleanValue:(D=D.nodes,a&&(D=D[0])),D},A.select1=function(t,e){return A.select(t,e,!0)};var Fe=function(t){return Array.isArray(t)&&t.every(W)},Pt=function(t){return function(e){return W(e)&&e.nodeType===t}};ht(A,{isNodeLike:W,isArrayOfNodes:Fe,isElement:Pt(b.ELEMENT_NODE),isAttribute:Pt(b.ATTRIBUTE_NODE),isTextNode:Pt(b.TEXT_NODE),isCDATASection:Pt(b.CDATA_SECTION_NODE),isProcessingInstruction:Pt(b.PROCESSING_INSTRUCTION_NODE),isComment:Pt(b.COMMENT_NODE),isDocumentNode:Pt(b.DOCUMENT_NODE),isDocumentTypeNode:Pt(b.DOCUMENT_TYPE_NODE),isDocumentFragment:Pt(b.DOCUMENT_FRAGMENT_NODE)})})(d)})(Zt)),Zt}var ge=Ne();const se=self,ve={ubl:"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2",cbc:"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",cac:"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",rsm:"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100",ram:"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100",udt:"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100",qdt:"urn:un:unece:uncefact:data:standard:QualifiedDataType:100"},Ae=ge.useNamespaces(ve),K={xmlVersion:0,doc:null,xmlLines:[],mappings:[],mappingByKey:new Map,sortedCursorMappings:[],elementIndex:[],countByKey:new Map,matchesCache:new Map,nodeCache:new Map},Te={"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2":"ubl","urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2":"cac","urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2":"cbc","urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100":"rsm","urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":"ram","urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100":"udt","urn:un:unece:uncefact:data:standard:QualifiedDataType:100":"qdt"};function It(h){se.postMessage(h)}function ae(h,d){return h.line!==d.line?h.line-d.line:h.column-d.column}function ye(h){const d=[];let A=h;for(;A&&A.nodeType===1;){const O=A.namespaceURI,F=A.localName||A.tagName,V=O?Te[O]:null,W=V?\`\${V}:\${F}\`:A.tagName;d.unshift(W),A=A.parentNode}return d.length?\`/\${d.join("/")}\`:""}function we(h){return h?h.nodeType===1?h:h.nodeType===2&&h.ownerElement?h.ownerElement:h.parentNode??null:null}function ue(h){const d=we(h);if(!d)return null;const A=typeof d.lineNumber=="number"?d.lineNumber:1,O=typeof d.columnNumber=="number"?d.columnNumber:1,F=typeof h?.nodeType=="number"?h.nodeType:1,V=typeof d.toString=="function"?String(d.toString()):"",W=V.split(\`
|
|
9
|
+
\`),it=A+Math.max(0,W.length-1),pt=W.length>1?(W[W.length-1]?.length??0)+1:Math.max(O+Math.max(0,V.length),O+1);return{line:A,column:O,nodeType:F,endLine:it,endColumn:pt}}function le(h){if(!K.doc)return[];try{const d=Ae(h,K.doc);return Array.isArray(d)?d:d!=null?[d]:[]}catch{return[]}}function pe(h,d){let A=d;for(;A;){if(A===h)return!0;A=A.parentNode}return!1}function fe(h,d){if(!d?.length)return h;const A=De(d);if(!A.length)return[];let O=h;for(const F of A)O=O.filter(V=>pe(F,V));return O}function De(h){const d=[];for(const A of h){let O=$t(A.nodeKey);for(const V of d)O=O.filter(W=>pe(V,W));const F=O[A.occurrenceIndex];if(!F)return[];d.push(F)}return d}function $t(h){const d=K.nodeCache.get(h);if(d)return d;const A=K.mappingByKey.get(h);if(!A)return[];const O=le(A.xpath);return K.nodeCache.set(h,O),O}function be(h,d){if(!h||!d)return h;const A=d.match(/<\\/\\s*([A-Za-z_][\\w.-]*(?::[\\w.-]+)?)\\s*>/);if(!A)return h;const O=A[1],F=h.split("/").filter(Boolean);if(!F.length)return h;for(let V=F.length-1;V>=0;V--)if(F[V]===O)return\`/\${F.slice(0,V+1).join("/")}\`;return h}function Oe(h,d){const A=[];let O=0;const F=V=>{if(!V)return;V.nodeType===1&&typeof V.lineNumber=="number"&&typeof V.columnNumber=="number"&&(O+=1,A.push({line:V.lineNumber,column:V.columnNumber,absolutePath:ye(V)}),O%5e3===0&&It({type:"INIT_PROGRESS",xmlVersion:d,scannedElements:O}));const W=V.childNodes;if(W)for(let it=0;it<W.length;it++)F(W[it])};return F(h),A.sort((V,W)=>ae(V,W)),A}function Ce(h){const d=K.mappings.length,A=[];for(let O=0;O<d;O++){const F=K.mappings[O],V=le(F.xpath).length;K.countByKey.set(F.key,V),A.push({key:F.key,count:V}),(A.length>=25||O===d-1)&&(It({type:"COUNT_BATCH",xmlVersion:h,entries:[...A],done:O+1,total:d}),A.length=0)}}function Se(h){K.xmlVersion=h.xmlVersion,K.xmlLines=h.xmlText.split(/\\r?\\n/),K.mappings=h.mappings,K.mappingByKey=new Map(h.mappings.map(A=>[A.key,A])),K.sortedCursorMappings=[...h.mappings].sort((A,O)=>O.cursorXpath.length-A.cursorXpath.length),K.countByKey.clear(),K.matchesCache.clear(),K.nodeCache.clear();const d=new xe.DOMParser().parseFromString(h.xmlText,"application/xml");K.doc=d,K.elementIndex=Oe(d,h.xmlVersion),Ce(h.xmlVersion),It({type:"INIT_READY",xmlVersion:h.xmlVersion,scannedElements:K.elementIndex.length})}function Re(h){if(h.xmlVersion!==K.xmlVersion||!K.elementIndex.length){It({type:"CURSOR_RESULT",xmlVersion:h.xmlVersion,requestId:h.requestId,key:null});return}const d={line:h.line,column:h.column};let A=0,O=K.elementIndex.length-1,F=-1;for(;A<=O;){const at=A+O>>1;ae({line:K.elementIndex[at].line,column:K.elementIndex[at].column},d)<=0?(F=at,A=at+1):O=at-1}const V=F>=0?K.elementIndex[F].absolutePath:"",W=h.line>=1&&h.line<=K.xmlLines.length?K.xmlLines[h.line-1]:"",it=be(V,W);let pt=null,mt=null;for(const at of K.sortedCursorMappings)if(it.startsWith(at.cursorXpath)){pt=at.key,mt=at.cursorXpath;break}It({type:"CURSOR_RESULT",xmlVersion:h.xmlVersion,requestId:h.requestId,key:pt,debug:{targetLine:h.line,targetColumn:h.column,bestIndex:F,bestLine:F>=0?K.elementIndex[F].line:null,bestColumn:F>=0?K.elementIndex[F].column:null,absolutePath:it,matchedCursorXpath:mt}})}function _e(h){if(h.xmlVersion!==K.xmlVersion)return;if(!K.mappingByKey.get(h.nodeKey)){It({type:"MATCH_RESULT",xmlVersion:h.xmlVersion,requestId:h.requestId,nodeKey:h.nodeKey,total:0,matches:[]});return}if(!K.matchesCache.get(h.nodeKey)){const pt=$t(h.nodeKey).map(mt=>ue(mt)).filter(mt=>!!mt);K.matchesCache.set(h.nodeKey,pt)}const O=fe($t(h.nodeKey),h.context).map(it=>ue(it)).filter(it=>!!it),F=Math.max(0,h.offset),V=Math.max(F,F+Math.max(1,h.limit)),W=O.slice(F,V);It({type:"MATCH_RESULT",xmlVersion:h.xmlVersion,requestId:h.requestId,nodeKey:h.nodeKey,total:O.length,matches:W})}function Ie(h){if(h.xmlVersion!==K.xmlVersion)return;if(!K.mappingByKey.get(h.nodeKey)){It({type:"COUNT_RESULT",xmlVersion:h.xmlVersion,requestId:h.requestId,nodeKey:h.nodeKey,count:0});return}const A=fe($t(h.nodeKey),h.context);It({type:"COUNT_RESULT",xmlVersion:h.xmlVersion,requestId:h.requestId,nodeKey:h.nodeKey,count:A.length})}se.onmessage=h=>{const d=h.data;try{if(d.type==="INIT"){Se(d);return}if(d.type==="CURSOR_LOOKUP"){Re(d);return}if(d.type==="GET_MATCHES"){_e(d);return}d.type==="GET_COUNT"&&Ie(d)}catch(A){It({type:"ERROR",xmlVersion:d.xmlVersion,requestId:"requestId"in d?d.requestId:void 0,message:A instanceof Error?A.message:"Unknown worker error"})}}})();
|
|
10
|
+
`,fe=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",ve],{type:"text/javascript;charset=utf-8"});function Ue(t){let r;try{if(r=fe&&(self.URL||self.webkitURL).createObjectURL(fe),!r)throw"";const i=new Worker(r,{name:t?.name});return i.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(r)}),i}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(ve),{name:t?.name})}}function He(){return typeof window<"u"&&window.localStorage.getItem("xmlExplorerDebug")==="1"}function ke(t){const{xmlText:r,syntax:i,mappings:n}=t,o=l.useRef(null),c=l.useRef(0),d=l.useRef(0),m=l.useRef(new Map),f=l.useRef(new Map),b=l.useRef(null),D=l.useRef(null),_=l.useRef("idle"),[I,A]=l.useState("idle"),[k,F]=l.useState(null),[j,z]=l.useState({}),[W,L]=l.useState(null),[Z,V]=l.useState(null),[ee,U]=l.useState(null);l.useEffect(()=>{_.current=I},[I]);const ie=l.useMemo(()=>n.map(S=>`${S.key}|${S.xpath}`).join("||"),[n]);l.useEffect(()=>{const S=new Ue;return o.current=S,S.onmessage=T=>{const u=T.data;if(u.xmlVersion===c.current)switch(u.type){case"INIT_PROGRESS":A("indexing");return;case"INIT_READY":A("ready"),L(y=>y?.total?y:null);return;case"COUNT_BATCH":z(y=>{const x={...y};for(const B of u.entries)x[B.key]=B.count;return x}),L({done:u.done,total:u.total}),u.done>=u.total&&L(null);return;case"CURSOR_RESULT":if(u.requestId!==d.current)return;He()&&console.debug("[xml-explorer] cursor-result",{requestId:u.requestId,key:u.key,debug:u.debug}),V(u.key),U(u.debug??null);return;case"MATCH_RESULT":{const y=m.current.get(u.requestId);y&&(m.current.delete(u.requestId),y.resolve({total:u.total,matches:u.matches}));return}case"COUNT_RESULT":{const y=f.current.get(u.requestId);y&&(f.current.delete(u.requestId),y.resolve(u.count));return}case"ERROR":if(A("error"),F(u.message),typeof u.requestId=="number"){const y=m.current.get(u.requestId);y&&(m.current.delete(u.requestId),y.reject(new Error(u.message)));const x=f.current.get(u.requestId);x&&(f.current.delete(u.requestId),x.reject(new Error(u.message)))}}},()=>{S.terminate(),o.current=null,m.current.forEach(T=>T.reject(new Error("Worker terminated"))),m.current.clear(),f.current.forEach(T=>T.reject(new Error("Worker terminated"))),f.current.clear()}},[]),l.useEffect(()=>{c.current+=1;const S=c.current;d.current=0,V(null),F(null),A("indexing"),z({}),L(n.length?{done:0,total:n.length}:null),U(null),m.current.forEach(u=>u.reject(new Error("Canceled due to new XML version"))),m.current.clear(),f.current.forEach(u=>u.reject(new Error("Canceled due to new XML version"))),f.current.clear();const T={type:"INIT",xmlVersion:S,xmlText:r,syntax:i,mappings:n};o.current?.postMessage(T)},[r,i,ie,n]);const M=l.useCallback((S,T)=>{if(_.current!=="ready"||b.current===S&&D.current===T)return;b.current=S,D.current=T;const u=++d.current,y={type:"CURSOR_LOOKUP",xmlVersion:c.current,requestId:u,line:S,column:T};o.current?.postMessage(y)},[]),$=l.useCallback((S,T,u=1,y)=>new Promise((x,B)=>{const q=++d.current,H={type:"GET_MATCHES",xmlVersion:c.current,requestId:q,nodeKey:S,offset:T,limit:u,context:y};m.current.set(q,{resolve:x,reject:B}),o.current?.postMessage(H)}),[]),G=l.useCallback((S,T)=>new Promise((u,y)=>{const x=++d.current,B={type:"GET_COUNT",xmlVersion:c.current,requestId:x,nodeKey:S,context:T};f.current.set(x,{resolve:u,reject:y}),o.current?.postMessage(B)}),[]);return{workerState:I,error:k,countByKey:j,countProgress:W,cursorMatchKey:Z,cursorLookupDebug:ee,lookupCursor:M,requestMatches:$,requestCount:G}}const Fe=120,Ae=500;function Te(){return typeof window<"u"&&window.localStorage.getItem("xmlExplorerDebug")==="1"}function Ve({xml:t,syntax:r="cii"}){const i=l.useRef(null),n=l.useRef([]),o=l.useRef(null),c=l.useRef(new Set),d=l.useRef("idle"),m=l.useRef(!1),f=l.useRef(null),b=l.useRef(null),D=l.useRef(null),[_,I]=l.useState(""),[A,k]=l.useState("nearest"),[F,j]=l.useState(null),[z,W]=l.useState({}),[L,Z]=l.useState({}),[V,ee]=l.useState({});l.useEffect(()=>{W({}),j(null),ee({}),c.current.clear()},[t]);const U=l.useMemo(()=>Ee(),[]),ie=l.useMemo(()=>Ie(U,r),[U,r]),{workerState:M,error:$,countByKey:G,countProgress:S,cursorMatchKey:T,cursorLookupDebug:u,lookupCursor:y,requestMatches:x,requestCount:B}=ke({xmlText:t,syntax:r,mappings:ie});l.useEffect(()=>{d.current=M},[M]),l.useEffect(()=>{const a=E=>{E.key==="Control"&&(m.current=!0)},s=E=>{E.key==="Control"&&(m.current=!1)},C=()=>{m.current=!1};return window.addEventListener("keydown",a),window.addEventListener("keyup",s),window.addEventListener("blur",C),()=>{window.removeEventListener("keydown",a),window.removeEventListener("keyup",s),window.removeEventListener("blur",C)}},[]),l.useEffect(()=>{$&&I($)},[$]);const q=a=>a.xpaths?.[r],H=l.useMemo(()=>{const a=s=>{const C=s.children??[],E=ne(s.key),w=E.length>0?V[s.key]:void 0,O=typeof w=="number"?w:E.length>0?void 0:G[ce(s.key)]??0;if(typeof O=="number"&&O>1&&C.length>0&&L[s.key]){const R=Math.min(O,Ae);return{...s,children:Array.from({length:R},(P,N)=>{const K=N+1,Q=`${s.key}::${K}`;return{key:Q,id:s.id,title:`${s.title} [${K}]`,xpaths:s.xpaths,isOccurrence:!0,children:C.map((Y,re)=>{const X=ye(Q,Y.id,re);return a({...Y,key:X})})}})}}return{...s,children:C.map((R,P)=>a({...R,key:ye(s.key,R.id,P)}))}};return a(U)},[U,G,V,L]),ae=l.useMemo(()=>qe(H,L),[H,L]);l.useEffect(()=>{D.current=H},[H]),l.useEffect(()=>{F&&requestAnimationFrame(()=>{Ne(f.current,F)})},[F,H,L]),l.useEffect(()=>{if(!T)return;const a=`${T}|${u?.bestLine??""}|${u?.bestColumn??""}`;if(b.current===a)return;b.current=a;let s=!1;return(async()=>{const E=u?.bestLine,w=u?.bestColumn,O=Ke(u),R=ge(u?.absolutePath),P=ge(u?.matchedCursorXpath);if(!O&&A==="strict"){e(),I(`No exact BT/BG for ${R}. Strict mode blocks fallback${P?` (nearest: ${P})`:""}.`);return}let N=T;if(typeof E=="number"&&typeof w=="number"&&(N=await Qe(T,E,w,U,B,x)),Te()&&console.debug("[xml-explorer] editor->tree sync",{cursorMatchKey:T,resolvedKey:N,depth:ne(N).length,cursor:{line:E,column:w}}),s)return;e(),j(X=>X===N?X:N),Ge(N,Z);const Q=(D.current?le(D.current,N):null)?.title??N,Y=ce(N),re=ne(N);try{const X=re.length>0?10:Math.min(50,G[Y]??1),J=await x(Y,0,Math.max(1,X),re),de=typeof E=="number"&&typeof w=="number"?J.matches[be(J.matches,E,w)]:J.matches[0];if(!de||s)return;g(de,Q,0,J.total),O||I(`No exact BT/BG for ${R}. Mapped to nearest: ${P}.`),W(xe=>({...xe,[N]:0}))}catch{}})(),()=>{s=!0}},[T,u,U,x,B,G,A]),l.useEffect(()=>{if(M==="ready")for(const a of ae)typeof V[a.key]!="number"&&(c.current.has(a.key)||(c.current.add(a.key),B(a.baseKey,a.context).then(s=>{ee(C=>({...C,[a.key]:s}))}).catch(()=>{}).finally(()=>{c.current.delete(a.key)})))},[M,ae,V,B]);function e(){const a=i.current,s=a?.getModel();!a||!s||(n.current=a.deltaDecorations(n.current,[]))}function p(a){Z(s=>({...s,[a]:!s[a]}))}function g(a,s,C,E){const w=i.current,O=w?.getModel();if(!w||!O)return;const R=Math.min(Math.max(1,a.line),O.getLineCount()),P=O.getLineMaxColumn(R),N=Math.min(Math.max(1,a.column),P),K=a.endLine??R,Q=Math.min(Math.max(R,K),O.getLineCount()),Y=O.getLineMaxColumn(Q),re=a.endColumn??Y,X=Math.min(Math.max(1,re),Y),J=new Be.Range(R,N,Q,X);w.revealRangeInCenter(J),n.current=w.deltaDecorations(n.current,[{range:J,options:{inlineClassName:"xml-xpath-highlight"}}]),I(E>1?`Highlighted ${s}: ${C+1}/${E}`:`Highlighted ${s}`)}async function v(a){j(a.key);const s=ce(a.key),C=ne(a.key),E=a.isOccurrence?1:C.length?void 0:G[s]??0,w=q(a);if(!w){e();return}if(E===0)I(`${a.id}: no match found in XML. (${w})`),e();else{const O=z[a.key]??-1,R=a.isOccurrence?0:F===a.key&&typeof E=="number"&&E>1?(O+1)%E:0;try{const P=await x(s,R,1,C),N=P.matches[0];N?(g(N,a.title,a.isOccurrence?0:R,P.total),W(K=>({...K,[a.key]:a.isOccurrence?0:R}))):(I(`${a.id}: no match found in XML.`),e())}catch(P){const N=P instanceof Error?P.message:"Failed to resolve match";I(N)}}a.children?.length&&p(a.key)}function te(a){if(d.current!=="ready"||!m.current)return;o.current!=null&&window.clearTimeout(o.current);const s=a.position;Te()&&console.debug("[xml-explorer] cursor-change",{line:s.lineNumber,column:s.column}),o.current=window.setTimeout(()=>{y(s.lineNumber,s.column)},Fe)}return h.jsxs("div",{style:{height:"100%",maxHeight:"100%",minHeight:0,overflow:"hidden",boxSizing:"border-box",display:"flex",flexDirection:"column",width:"100%"},children:[h.jsxs("div",{style:{padding:10,borderBottom:"1px solid #ddd",display:"flex",gap:12,alignItems:"center",fontFamily:"system-ui, sans-serif",flexShrink:0,minWidth:0},children:[h.jsx("button",{onClick:e,style:{padding:"6px 10px"},children:"Clear highlight"}),h.jsxs("button",{onClick:()=>k(a=>a==="nearest"?"strict":"nearest"),style:{padding:"6px 10px"},title:"Toggle mapping mode for XML clicks",children:["Mode: ",A==="nearest"?"Nearest fallback":"Strict exact"]}),h.jsxs("span",{style:{color:"#374151",fontSize:12},children:["Worker:"," ",M==="indexing"?"indexing XML...":M==="ready"?"ready":M]}),h.jsxs("span",{style:{color:"#374151",fontSize:12},children:["Counts:"," ",S?`${S.done}/${S.total}`:"ready"]}),h.jsx("span",{style:{fontFamily:"monospace",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:_,children:_})]}),h.jsxs("div",{style:{flex:1,minHeight:0,overflow:"hidden",display:"grid",gridTemplateColumns:"1fr 360px",width:"100%"},children:[h.jsx("div",{style:{minWidth:0,minHeight:0,width:"100%"},children:h.jsx(we,{height:"100%",defaultLanguage:"xml",value:t,onMount:a=>{i.current=a,a.onDidChangeCursorPosition(te)},options:{minimap:{enabled:!1},fontSize:13,wordWrap:"on",scrollBeyondLastLine:!1,automaticLayout:!0}})}),h.jsxs("div",{style:{borderLeft:"1px solid #ddd",padding:10,overflow:"hidden",minHeight:0,display:"flex",flexDirection:"column",fontFamily:"system-ui, sans-serif",background:"#fafafa"},children:[h.jsx("div",{style:{fontWeight:600,marginBottom:8,flexShrink:0},children:"BT / BG (EN16931)"}),h.jsx("div",{ref:f,style:{flex:1,minHeight:0,overflow:"auto"},children:h.jsx(Me,{root:H,expanded:L,selectedKey:F,onToggle:p,onClickNode:v,getNodeXpath:q,getMatchCount:a=>{if(a.isOccurrence)return 1;const s=V[a.key];if(typeof s=="number")return s;if(ne(a.key).length>0)return;const C=ce(a.key);return G[C]}})}),h.jsx("div",{style:{marginTop:10,fontSize:12,color:"#444"},children:"Cursor sync and count calculation run in a worker thread."})]})]}),h.jsx("style",{children:`
|
|
7
11
|
.xml-xpath-highlight {
|
|
8
12
|
background: rgba(255, 230, 0, 0.35);
|
|
9
13
|
border-bottom: 1px solid rgba(255, 180, 0, 0.9);
|
|
10
14
|
}
|
|
11
|
-
`})]})}function Ge(r
|
|
15
|
+
`})]})}function Ge(t,r){const i=Ye(t);i.length&&r(n=>{let o=!1;const c={...n};for(const d of i)c[d]||(c[d]=!0,o=!0);return o?c:n})}function je(t){const r=t.indexOf("::");return r>=0?t.slice(0,r):t}function ce(t){return t.split(".").map(je).join(".")}function ne(t){const r=[],i=t.split("."),n=[];for(const o of i){const c=o.indexOf("::");if(c>=0){const d=Number(o.slice(c+2)),m=Number.isFinite(d)?Math.max(0,d-1):0,f=o.slice(0,c);n.push(f),r.push({nodeKey:n.join("."),occurrenceIndex:m})}else n.push(o)}return r}function qe(t,r){const i=[],n=o=>{const c=ne(o.key);if(c.length>0&&o.xpaths&&i.push({key:o.key,baseKey:ce(o.key),context:c}),!!o.children?.length&&r[o.key])for(const d of o.children)n(d)};return n(t),i}function Ye(t){const r=t.split("."),i=[],n=[];for(let d=0;d<r.length-1;d++){const m=r[d],f=m.indexOf("::");if(f>=0){const b=m.slice(0,f);n.push(b),i.push(n.join(".")),n[n.length-1]=m,i.push(n.join("."))}else n.push(m),i.push(n.join("."))}const o=r[r.length-1],c=o.indexOf("::");if(c>=0){const d=o.slice(0,c);i.push([...n,d].join("."))}return Array.from(new Set(i))}function ye(t,r,i){return`${t}.${r}:${i}`}function le(t,r){if(t.key===r)return t;if(!t.children?.length)return null;for(const i of t.children){const n=le(i,r);if(n)return n}return null}function Xe(t,r){if(!t)return!1;const i=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(r):r.replace(/["\\]/g,"\\$&"),n=t.querySelector(`[data-tree-key="${i}"]`);return n?(n.scrollIntoView({block:"center",inline:"nearest"}),!0):!1}function Ne(t,r,i=12){Xe(t,r)||i<=0||requestAnimationFrame(()=>{Ne(t,r,i-1)})}function We(t,r,i){if(!t.length)return-1;let n=0,o=Number.POSITIVE_INFINITY;for(let c=0;c<t.length;c++){const d=t[c],m=Math.abs(d.line-r)*1e3+Math.abs(d.column-i);m<o&&(o=m,n=c)}return n}function $e(t,r,i){const n=t.line,o=t.column,c=t.endLine??n,d=t.endColumn??o;return!(r<n||r>c||r===n&&i<o||r===c&&i>d)}function be(t,r,i){for(let n=0;n<t.length;n++)if($e(t[n],r,i))return n;return We(t,r,i)}function Ke(t){return t?.absolutePath?t.matchedCursorXpath?t.absolutePath===t.matchedCursorXpath:!1:!0}function ge(t){if(!t)return"unknown element";const r=t.split("/").filter(Boolean);return r[r.length-1]??"unknown element"}async function Qe(t,r,i,n,o,c){const d=t.split("."),m=[...d],f=[];for(let b=0;b<d.length;b++){const D=d.slice(0,b+1).join(".");if(!le(n,D)?.children?.length)continue;let I=0;try{I=await o(D,f)}catch{continue}if(!(I<=1))try{const A=await c(D,0,Math.min(I,Ae),f),k=be(A.matches,r,i);if(k<0)continue;m[b]=`${d[b]}::${k+1}`,f.push({nodeKey:D,occurrenceIndex:k})}catch{}}return m.join(".")}exports.XMLExplorer=Ve;exports.btTree=Se;exports.buildMappingsForSyntax=Ie;exports.buildRuntimeTree=Ee;
|