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AAkBjJ,EAAKmJ,GAGpD,OAFA8B,EAAYpL,KAAK4I,qBAAqBwC,GAEpB,KAAdA,EACKpL,KAAKsM,UAAUI,GAAS,IAAMvM,EAAM4K,EAAU/K,KAAK4N,SAASzN,GAAOH,KAAKuM,WAExEvM,KAAKsM,UAAUI,GAAS,IAAMvM,EAAM4K,EAAU,IACnDK,EACA,KAAOjL,EAAMH,KAAKuM,UAExB,CACF,EAEAP,EAAQrL,UAAUiI,qBAAuB,SAAUwC,GACjD,GAAIA,GAAaA,EAAUhJ,OAAS,GAAKpC,KAAKoB,QAAQiK,gBACpD,IAAK,IAAInJ,EAAI,EAAGA,EAAIlC,KAAKoB,QAAQkK,SAASlJ,OAAQF,IAAK,CACrD,MAAMqJ,EAASvL,KAAKoB,QAAQkK,SAASpJ,GACrCkJ,EAAYA,EAAU7B,QAAQgC,EAAOC,MAAOD,EAAOjC,IACrD,CAEF,OAAO8B,CACT,EEtgBA,U","sources":["webpack://XMLBuilder/webpack/universalModuleDefinition","webpack://XMLBuilder/webpack/bootstrap","webpack://XMLBuilder/webpack/runtime/define property getters","webpack://XMLBuilder/webpack/runtime/hasOwnProperty shorthand","webpack://XMLBuilder/webpack/runtime/make namespace object","webpack://XMLBuilder/./node_modules/path-expression-matcher/src/Expression.js","webpack://XMLBuilder/./node_modules/path-expression-matcher/src/Matcher.js","webpack://XMLBuilder/./node_modules/fast-xml-builder/src/orderedJs2Xml.js","webpack://XMLBuilder/./node_modules/fast-xml-builder/src/fxb.js","webpack://XMLBuilder/./node_modules/fast-xml-builder/src/ignoreAttributes.js","webpack://XMLBuilder/./src/xmlbuilder/json2xml.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"XMLBuilder\"] = factory();\n\telse\n\t\troot[\"XMLBuilder\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Expression - Parses and stores a tag pattern expression\n * \n * Patterns are parsed once and stored in an optimized structure for fast matching.\n * \n * @example\n * const expr = new Expression(\"root.users.user\");\n * const expr2 = new Expression(\"..user[id]:first\");\n * const expr3 = new Expression(\"root/users/user\", { separator: '/' });\n */\nexport default class Expression {\n  /**\n   * Create a new Expression\n   * @param {string} pattern - Pattern string (e.g., \"root.users.user\", \"..user[id]\")\n   * @param {Object} options - Configuration options\n   * @param {string} options.separator - Path separator (default: '.')\n   */\n  constructor(pattern, options = {}, data) {\n    this.pattern = pattern;\n    this.separator = options.separator || '.';\n    this.segments = this._parse(pattern);\n    this.data = data;\n    // Cache expensive checks for performance (O(1) instead of O(n))\n    this._hasDeepWildcard = this.segments.some(seg => seg.type === 'deep-wildcard');\n    this._hasAttributeCondition = this.segments.some(seg => seg.attrName !== undefined);\n    this._hasPositionSelector = this.segments.some(seg => seg.position !== undefined);\n  }\n\n  /**\n   * Parse pattern string into segments\n   * @private\n   * @param {string} pattern - Pattern to parse\n   * @returns {Array} Array of segment objects\n   */\n  _parse(pattern) {\n    const segments = [];\n\n    // Split by separator but handle \"..\" specially\n    let i = 0;\n    let currentPart = '';\n\n    while (i < pattern.length) {\n      if (pattern[i] === this.separator) {\n        // Check if next char is also separator (deep wildcard)\n        if (i + 1 < pattern.length && pattern[i + 1] === this.separator) {\n          // Flush current part if any\n          if (currentPart.trim()) {\n            segments.push(this._parseSegment(currentPart.trim()));\n            currentPart = '';\n          }\n          // Add deep wildcard\n          segments.push({ type: 'deep-wildcard' });\n          i += 2; // Skip both separators\n        } else {\n          // Regular separator\n          if (currentPart.trim()) {\n            segments.push(this._parseSegment(currentPart.trim()));\n          }\n          currentPart = '';\n          i++;\n        }\n      } else {\n        currentPart += pattern[i];\n        i++;\n      }\n    }\n\n    // Flush remaining part\n    if (currentPart.trim()) {\n      segments.push(this._parseSegment(currentPart.trim()));\n    }\n\n    return segments;\n  }\n\n  /**\n   * Parse a single segment\n   * @private\n   * @param {string} part - Segment string (e.g., \"user\", \"ns::user\", \"user[id]\", \"ns::user:first\")\n   * @returns {Object} Segment object\n   */\n  _parseSegment(part) {\n    const segment = { type: 'tag' };\n\n    // NEW NAMESPACE SYNTAX (v2.0):\n    // ============================\n    // Namespace uses DOUBLE colon (::)\n    // Position uses SINGLE colon (:)\n    // \n    // Examples:\n    //   \"user\"              → tag\n    //   \"user:first\"        → tag + position\n    //   \"user[id]\"          → tag + attribute\n    //   \"user[id]:first\"    → tag + attribute + position\n    //   \"ns::user\"          → namespace + tag\n    //   \"ns::user:first\"    → namespace + tag + position\n    //   \"ns::user[id]\"      → namespace + tag + attribute\n    //   \"ns::user[id]:first\" → namespace + tag + attribute + position\n    //   \"ns::first\"         → namespace + tag named \"first\" (NO ambiguity!)\n    //\n    // This eliminates all ambiguity:\n    //   :: = namespace separator\n    //   :  = position selector\n    //   [] = attributes\n\n    // Step 1: Extract brackets [attr] or [attr=value]\n    let bracketContent = null;\n    let withoutBrackets = part;\n\n    const bracketMatch = part.match(/^([^\\[]+)(\\[[^\\]]*\\])(.*)$/);\n    if (bracketMatch) {\n      withoutBrackets = bracketMatch[1] + bracketMatch[3];\n      if (bracketMatch[2]) {\n        const content = bracketMatch[2].slice(1, -1);\n        if (content) {\n          bracketContent = content;\n        }\n      }\n    }\n\n    // Step 2: Check for namespace (double colon ::)\n    let namespace = undefined;\n    let tagAndPosition = withoutBrackets;\n\n    if (withoutBrackets.includes('::')) {\n      const nsIndex = withoutBrackets.indexOf('::');\n      namespace = withoutBrackets.substring(0, nsIndex).trim();\n      tagAndPosition = withoutBrackets.substring(nsIndex + 2).trim(); // Skip ::\n\n      if (!namespace) {\n        throw new Error(`Invalid namespace in pattern: ${part}`);\n      }\n    }\n\n    // Step 3: Parse tag and position (single colon :)\n    let tag = undefined;\n    let positionMatch = null;\n\n    if (tagAndPosition.includes(':')) {\n      const colonIndex = tagAndPosition.lastIndexOf(':'); // Use last colon for position\n      const tagPart = tagAndPosition.substring(0, colonIndex).trim();\n      const posPart = tagAndPosition.substring(colonIndex + 1).trim();\n\n      // Verify position is a valid keyword\n      const isPositionKeyword = ['first', 'last', 'odd', 'even'].includes(posPart) ||\n        /^nth\\(\\d+\\)$/.test(posPart);\n\n      if (isPositionKeyword) {\n        tag = tagPart;\n        positionMatch = posPart;\n      } else {\n        // Not a valid position keyword, treat whole thing as tag\n        tag = tagAndPosition;\n      }\n    } else {\n      tag = tagAndPosition;\n    }\n\n    if (!tag) {\n      throw new Error(`Invalid segment pattern: ${part}`);\n    }\n\n    segment.tag = tag;\n    if (namespace) {\n      segment.namespace = namespace;\n    }\n\n    // Step 4: Parse attributes\n    if (bracketContent) {\n      if (bracketContent.includes('=')) {\n        const eqIndex = bracketContent.indexOf('=');\n        segment.attrName = bracketContent.substring(0, eqIndex).trim();\n        segment.attrValue = bracketContent.substring(eqIndex + 1).trim();\n      } else {\n        segment.attrName = bracketContent.trim();\n      }\n    }\n\n    // Step 5: Parse position selector\n    if (positionMatch) {\n      const nthMatch = positionMatch.match(/^nth\\((\\d+)\\)$/);\n      if (nthMatch) {\n        segment.position = 'nth';\n        segment.positionValue = parseInt(nthMatch[1], 10);\n      } else {\n        segment.position = positionMatch;\n      }\n    }\n\n    return segment;\n  }\n\n  /**\n   * Get the number of segments\n   * @returns {number}\n   */\n  get length() {\n    return this.segments.length;\n  }\n\n  /**\n   * Check if expression contains deep wildcard\n   * @returns {boolean}\n   */\n  hasDeepWildcard() {\n    return this._hasDeepWildcard;\n  }\n\n  /**\n   * Check if expression has attribute conditions\n   * @returns {boolean}\n   */\n  hasAttributeCondition() {\n    return this._hasAttributeCondition;\n  }\n\n  /**\n   * Check if expression has position selectors\n   * @returns {boolean}\n   */\n  hasPositionSelector() {\n    return this._hasPositionSelector;\n  }\n\n  /**\n   * Get string representation\n   * @returns {string}\n   */\n  toString() {\n    return this.pattern;\n  }\n}","import ExpressionSet from \"./ExpressionSet.js\";\n\n/**\n * MatcherView - A lightweight read-only view over a Matcher's internal state.\n *\n * Created once by Matcher and reused across all callbacks. Holds a direct\n * reference to the parent Matcher so it always reflects current parser state\n * with zero copying or freezing overhead.\n *\n * Users receive this via {@link Matcher#readOnly} or directly from parser\n * callbacks. It exposes all query and matching methods but has no mutation\n * methods — misuse is caught at the TypeScript level rather than at runtime.\n *\n * @example\n * const matcher = new Matcher();\n * const view = matcher.readOnly();\n *\n * matcher.push(\"root\", {});\n * view.getCurrentTag(); // \"root\"\n * view.getDepth();      // 1\n */\nexport class MatcherView {\n  /**\n   * @param {Matcher} matcher - The parent Matcher instance to read from.\n   */\n  constructor(matcher) {\n    this._matcher = matcher;\n  }\n\n  /**\n   * Get the path separator used by the parent matcher.\n   * @returns {string}\n   */\n  get separator() {\n    return this._matcher.separator;\n  }\n\n  /**\n   * Get current tag name.\n   * @returns {string|undefined}\n   */\n  getCurrentTag() {\n    const path = this._matcher.path;\n    return path.length > 0 ? path[path.length - 1].tag : undefined;\n  }\n\n  /**\n   * Get current namespace.\n   * @returns {string|undefined}\n   */\n  getCurrentNamespace() {\n    const path = this._matcher.path;\n    return path.length > 0 ? path[path.length - 1].namespace : undefined;\n  }\n\n  /**\n   * Get current node's attribute value.\n   * @param {string} attrName\n   * @returns {*}\n   */\n  getAttrValue(attrName) {\n    const path = this._matcher.path;\n    if (path.length === 0) return undefined;\n    return path[path.length - 1].values?.[attrName];\n  }\n\n  /**\n   * Check if current node has an attribute.\n   * @param {string} attrName\n   * @returns {boolean}\n   */\n  hasAttr(attrName) {\n    const path = this._matcher.path;\n    if (path.length === 0) return false;\n    const current = path[path.length - 1];\n    return current.values !== undefined && attrName in current.values;\n  }\n\n  /**\n   * Get current node's sibling position (child index in parent).\n   * @returns {number}\n   */\n  getPosition() {\n    const path = this._matcher.path;\n    if (path.length === 0) return -1;\n    return path[path.length - 1].position ?? 0;\n  }\n\n  /**\n   * Get current node's repeat counter (occurrence count of this tag name).\n   * @returns {number}\n   */\n  getCounter() {\n    const path = this._matcher.path;\n    if (path.length === 0) return -1;\n    return path[path.length - 1].counter ?? 0;\n  }\n\n  /**\n   * Get current node's sibling index (alias for getPosition).\n   * @returns {number}\n   * @deprecated Use getPosition() or getCounter() instead\n   */\n  getIndex() {\n    return this.getPosition();\n  }\n\n  /**\n   * Get current path depth.\n   * @returns {number}\n   */\n  getDepth() {\n    return this._matcher.path.length;\n  }\n\n  /**\n   * Get path as string.\n   * @param {string} [separator] - Optional separator (uses default if not provided)\n   * @param {boolean} [includeNamespace=true]\n   * @returns {string}\n   */\n  toString(separator, includeNamespace = true) {\n    return this._matcher.toString(separator, includeNamespace);\n  }\n\n  /**\n   * Get path as array of tag names.\n   * @returns {string[]}\n   */\n  toArray() {\n    return this._matcher.path.map(n => n.tag);\n  }\n\n  /**\n   * Match current path against an Expression.\n   * @param {Expression} expression\n   * @returns {boolean}\n   */\n  matches(expression) {\n    return this._matcher.matches(expression);\n  }\n\n  /**\n   * Match any expression in the given set against the current path.\n   * @param {ExpressionSet} exprSet\n   * @returns {boolean}\n   */\n  matchesAny(exprSet) {\n    return exprSet.matchesAny(this._matcher);\n  }\n}\n\n/**\n * Matcher - Tracks current path in XML/JSON tree and matches against Expressions.\n *\n * The matcher maintains a stack of nodes representing the current path from root to\n * current tag. It only stores attribute values for the current (top) node to minimize\n * memory usage. Sibling tracking is used to auto-calculate position and counter.\n *\n * Use {@link Matcher#readOnly} to obtain a {@link MatcherView} safe to pass to\n * user callbacks — it always reflects current state with no Proxy overhead.\n *\n * @example\n * const matcher = new Matcher();\n * matcher.push(\"root\", {});\n * matcher.push(\"users\", {});\n * matcher.push(\"user\", { id: \"123\", type: \"admin\" });\n *\n * const expr = new Expression(\"root.users.user\");\n * matcher.matches(expr); // true\n */\nexport default class Matcher {\n  /**\n   * Create a new Matcher.\n   * @param {Object} [options={}]\n   * @param {string} [options.separator='.'] - Default path separator\n   */\n  constructor(options = {}) {\n    this.separator = options.separator || '.';\n    this.path = [];\n    this.siblingStacks = [];\n    // Each path node: { tag, values, position, counter, namespace? }\n    // values only present for current (last) node\n    // Each siblingStacks entry: Map<tagName, count> tracking occurrences at each level\n    this._pathStringCache = null;\n    this._view = new MatcherView(this);\n  }\n\n  /**\n   * Push a new tag onto the path.\n   * @param {string} tagName\n   * @param {Object|null} [attrValues=null]\n   * @param {string|null} [namespace=null]\n   */\n  push(tagName, attrValues = null, namespace = null) {\n    this._pathStringCache = null;\n\n    // Remove values from previous current node (now becoming ancestor)\n    if (this.path.length > 0) {\n      this.path[this.path.length - 1].values = undefined;\n    }\n\n    // Get or create sibling tracking for current level\n    const currentLevel = this.path.length;\n    if (!this.siblingStacks[currentLevel]) {\n      this.siblingStacks[currentLevel] = new Map();\n    }\n\n    const siblings = this.siblingStacks[currentLevel];\n\n    // Create a unique key for sibling tracking that includes namespace\n    const siblingKey = namespace ? `${namespace}:${tagName}` : tagName;\n\n    // Calculate counter (how many times this tag appeared at this level)\n    const counter = siblings.get(siblingKey) || 0;\n\n    // Calculate position (total children at this level so far)\n    let position = 0;\n    for (const count of siblings.values()) {\n      position += count;\n    }\n\n    // Update sibling count for this tag\n    siblings.set(siblingKey, counter + 1);\n\n    // Create new node\n    const node = {\n      tag: tagName,\n      position: position,\n      counter: counter\n    };\n\n    if (namespace !== null && namespace !== undefined) {\n      node.namespace = namespace;\n    }\n\n    if (attrValues !== null && attrValues !== undefined) {\n      node.values = attrValues;\n    }\n\n    this.path.push(node);\n  }\n\n  /**\n   * Pop the last tag from the path.\n   * @returns {Object|undefined} The popped node\n   */\n  pop() {\n    if (this.path.length === 0) return undefined;\n    this._pathStringCache = null;\n\n    const node = this.path.pop();\n\n    if (this.siblingStacks.length > this.path.length + 1) {\n      this.siblingStacks.length = this.path.length + 1;\n    }\n\n    return node;\n  }\n\n  /**\n   * Update current node's attribute values.\n   * Useful when attributes are parsed after push.\n   * @param {Object} attrValues\n   */\n  updateCurrent(attrValues) {\n    if (this.path.length > 0) {\n      const current = this.path[this.path.length - 1];\n      if (attrValues !== null && attrValues !== undefined) {\n        current.values = attrValues;\n      }\n    }\n  }\n\n  /**\n   * Get current tag name.\n   * @returns {string|undefined}\n   */\n  getCurrentTag() {\n    return this.path.length > 0 ? this.path[this.path.length - 1].tag : undefined;\n  }\n\n  /**\n   * Get current namespace.\n   * @returns {string|undefined}\n   */\n  getCurrentNamespace() {\n    return this.path.length > 0 ? this.path[this.path.length - 1].namespace : undefined;\n  }\n\n  /**\n   * Get current node's attribute value.\n   * @param {string} attrName\n   * @returns {*}\n   */\n  getAttrValue(attrName) {\n    if (this.path.length === 0) return undefined;\n    return this.path[this.path.length - 1].values?.[attrName];\n  }\n\n  /**\n   * Check if current node has an attribute.\n   * @param {string} attrName\n   * @returns {boolean}\n   */\n  hasAttr(attrName) {\n    if (this.path.length === 0) return false;\n    const current = this.path[this.path.length - 1];\n    return current.values !== undefined && attrName in current.values;\n  }\n\n  /**\n   * Get current node's sibling position (child index in parent).\n   * @returns {number}\n   */\n  getPosition() {\n    if (this.path.length === 0) return -1;\n    return this.path[this.path.length - 1].position ?? 0;\n  }\n\n  /**\n   * Get current node's repeat counter (occurrence count of this tag name).\n   * @returns {number}\n   */\n  getCounter() {\n    if (this.path.length === 0) return -1;\n    return this.path[this.path.length - 1].counter ?? 0;\n  }\n\n  /**\n   * Get current node's sibling index (alias for getPosition).\n   * @returns {number}\n   * @deprecated Use getPosition() or getCounter() instead\n   */\n  getIndex() {\n    return this.getPosition();\n  }\n\n  /**\n   * Get current path depth.\n   * @returns {number}\n   */\n  getDepth() {\n    return this.path.length;\n  }\n\n  /**\n   * Get path as string.\n   * @param {string} [separator] - Optional separator (uses default if not provided)\n   * @param {boolean} [includeNamespace=true]\n   * @returns {string}\n   */\n  toString(separator, includeNamespace = true) {\n    const sep = separator || this.separator;\n    const isDefault = (sep === this.separator && includeNamespace === true);\n\n    if (isDefault) {\n      if (this._pathStringCache !== null) {\n        return this._pathStringCache;\n      }\n      const result = this.path.map(n =>\n        (n.namespace) ? `${n.namespace}:${n.tag}` : n.tag\n      ).join(sep);\n      this._pathStringCache = result;\n      return result;\n    }\n\n    return this.path.map(n =>\n      (includeNamespace && n.namespace) ? `${n.namespace}:${n.tag}` : n.tag\n    ).join(sep);\n  }\n\n  /**\n   * Get path as array of tag names.\n   * @returns {string[]}\n   */\n  toArray() {\n    return this.path.map(n => n.tag);\n  }\n\n  /**\n   * Reset the path to empty.\n   */\n  reset() {\n    this._pathStringCache = null;\n    this.path = [];\n    this.siblingStacks = [];\n  }\n\n  /**\n   * Match current path against an Expression.\n   * @param {Expression} expression\n   * @returns {boolean}\n   */\n  matches(expression) {\n    const segments = expression.segments;\n\n    if (segments.length === 0) {\n      return false;\n    }\n\n    if (expression.hasDeepWildcard()) {\n      return this._matchWithDeepWildcard(segments);\n    }\n\n    return this._matchSimple(segments);\n  }\n\n  /**\n   * @private\n   */\n  _matchSimple(segments) {\n    if (this.path.length !== segments.length) {\n      return false;\n    }\n\n    for (let i = 0; i < segments.length; i++) {\n      if (!this._matchSegment(segments[i], this.path[i], i === this.path.length - 1)) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  /**\n   * @private\n   */\n  _matchWithDeepWildcard(segments) {\n    let pathIdx = this.path.length - 1;\n    let segIdx = segments.length - 1;\n\n    while (segIdx >= 0 && pathIdx >= 0) {\n      const segment = segments[segIdx];\n\n      if (segment.type === 'deep-wildcard') {\n        segIdx--;\n\n        if (segIdx < 0) {\n          return true;\n        }\n\n        const nextSeg = segments[segIdx];\n        let found = false;\n\n        for (let i = pathIdx; i >= 0; i--) {\n          if (this._matchSegment(nextSeg, this.path[i], i === this.path.length - 1)) {\n            pathIdx = i - 1;\n            segIdx--;\n            found = true;\n            break;\n          }\n        }\n\n        if (!found) {\n          return false;\n        }\n      } else {\n        if (!this._matchSegment(segment, this.path[pathIdx], pathIdx === this.path.length - 1)) {\n          return false;\n        }\n        pathIdx--;\n        segIdx--;\n      }\n    }\n\n    return segIdx < 0;\n  }\n\n  /**\n   * @private\n   */\n  _matchSegment(segment, node, isCurrentNode) {\n    if (segment.tag !== '*' && segment.tag !== node.tag) {\n      return false;\n    }\n\n    if (segment.namespace !== undefined) {\n      if (segment.namespace !== '*' && segment.namespace !== node.namespace) {\n        return false;\n      }\n    }\n\n    if (segment.attrName !== undefined) {\n      if (!isCurrentNode) {\n        return false;\n      }\n\n      if (!node.values || !(segment.attrName in node.values)) {\n        return false;\n      }\n\n      if (segment.attrValue !== undefined) {\n        if (String(node.values[segment.attrName]) !== String(segment.attrValue)) {\n          return false;\n        }\n      }\n    }\n\n    if (segment.position !== undefined) {\n      if (!isCurrentNode) {\n        return false;\n      }\n\n      const counter = node.counter ?? 0;\n\n      if (segment.position === 'first' && counter !== 0) {\n        return false;\n      } else if (segment.position === 'odd' && counter % 2 !== 1) {\n        return false;\n      } else if (segment.position === 'even' && counter % 2 !== 0) {\n        return false;\n      } else if (segment.position === 'nth' && counter !== segment.positionValue) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  /**\n   * Match any expression in the given set against the current path.\n   * @param {ExpressionSet} exprSet\n   * @returns {boolean}\n   */\n  matchesAny(exprSet) {\n    return exprSet.matchesAny(this);\n  }\n\n  /**\n   * Create a snapshot of current state.\n   * @returns {Object}\n   */\n  snapshot() {\n    return {\n      path: this.path.map(node => ({ ...node })),\n      siblingStacks: this.siblingStacks.map(map => new Map(map))\n    };\n  }\n\n  /**\n   * Restore state from snapshot.\n   * @param {Object} snapshot\n   */\n  restore(snapshot) {\n    this._pathStringCache = null;\n    this.path = snapshot.path.map(node => ({ ...node }));\n    this.siblingStacks = snapshot.siblingStacks.map(map => new Map(map));\n  }\n\n  /**\n   * Return the read-only {@link MatcherView} for this matcher.\n   *\n   * The same instance is returned on every call — no allocation occurs.\n   * It always reflects the current parser state and is safe to pass to\n   * user callbacks without risk of accidental mutation.\n   *\n   * @returns {MatcherView}\n   *\n   * @example\n   * const view = matcher.readOnly();\n   * // pass view to callbacks — it stays in sync automatically\n   * view.matches(expr);       // ✓\n   * view.getCurrentTag();     // ✓\n   * // view.push(...)         // ✗ method does not exist — caught by TypeScript\n   */\n  readOnly() {\n    return this._view;\n  }\n}","import { Expression, Matcher } from 'path-expression-matcher';\n\nconst EOL = \"\\n\";\n\n/**\n * \n * @param {array} jArray \n * @param {any} options \n * @returns \n */\nexport default function toXml(jArray, options) {\n    let indentation = \"\";\n    if (options.format && options.indentBy.length > 0) {\n        indentation = EOL;\n    }\n\n    // Pre-compile stopNode expressions for pattern matching\n    const stopNodeExpressions = [];\n    if (options.stopNodes && Array.isArray(options.stopNodes)) {\n        for (let i = 0; i < options.stopNodes.length; i++) {\n            const node = options.stopNodes[i];\n            if (typeof node === 'string') {\n                stopNodeExpressions.push(new Expression(node));\n            } else if (node instanceof Expression) {\n                stopNodeExpressions.push(node);\n            }\n        }\n    }\n\n    // Initialize matcher for path tracking\n    const matcher = new Matcher();\n\n    return arrToStr(jArray, options, indentation, matcher, stopNodeExpressions);\n}\n\nfunction arrToStr(arr, options, indentation, matcher, stopNodeExpressions) {\n    let xmlStr = \"\";\n    let isPreviousElementTag = false;\n\n    if (options.maxNestedTags && matcher.getDepth() > options.maxNestedTags) {\n        throw new Error(\"Maximum nested tags exceeded\");\n    }\n\n    if (!Array.isArray(arr)) {\n        // Non-array values (e.g. string tag values) should be treated as text content\n        if (arr !== undefined && arr !== null) {\n            let text = arr.toString();\n            text = replaceEntitiesValue(text, options);\n            return text;\n        }\n        return \"\";\n    }\n\n    for (let i = 0; i < arr.length; i++) {\n        const tagObj = arr[i];\n        const tagName = propName(tagObj);\n        if (tagName === undefined) continue;\n\n        // Extract attributes from \":@\" property\n        const attrValues = extractAttributeValues(tagObj[\":@\"], options);\n\n        // Push tag to matcher WITH attributes\n        matcher.push(tagName, attrValues);\n\n        // Check if this is a stop node using Expression matching\n        const isStopNode = checkStopNode(matcher, stopNodeExpressions);\n\n        if (tagName === options.textNodeName) {\n            let tagText = tagObj[tagName];\n            if (!isStopNode) {\n                tagText = options.tagValueProcessor(tagName, tagText);\n                tagText = replaceEntitiesValue(tagText, options);\n            }\n            if (isPreviousElementTag) {\n                xmlStr += indentation;\n            }\n            xmlStr += tagText;\n            isPreviousElementTag = false;\n            matcher.pop();\n            continue;\n        } else if (tagName === options.cdataPropName) {\n            if (isPreviousElementTag) {\n                xmlStr += indentation;\n            }\n            const val = tagObj[tagName][0][options.textNodeName];\n            const safeVal = String(val).replace(/\\]\\]>/g, ']]]]><![CDATA[>');\n            xmlStr += `<![CDATA[${safeVal}]]>`;\n            isPreviousElementTag = false;\n            matcher.pop();\n            continue;\n        } else if (tagName === options.commentPropName) {\n            const val = tagObj[tagName][0][options.textNodeName]\n            const safeVal = String(val)\n                .replace(/--/g, '- -')   // -- is illegal anywhere in comment content\n                .replace(/-$/, '- ');    // trailing - would form -- with the closing -->\n            xmlStr += indentation + `<!--${safeVal}-->`;\n            isPreviousElementTag = true;\n            matcher.pop();\n            continue;\n        } else if (tagName[0] === \"?\") {\n            const attStr = attr_to_str(tagObj[\":@\"], options, isStopNode);\n            const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n            let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n            piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\"; //remove extra spacing\n            xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`;\n            isPreviousElementTag = true;\n            matcher.pop();\n            continue;\n        }\n\n        let newIdentation = indentation;\n        if (newIdentation !== \"\") {\n            newIdentation += options.indentBy;\n        }\n\n        // Pass isStopNode to attr_to_str so attributes are also not processed for stopNodes\n        const attStr = attr_to_str(tagObj[\":@\"], options, isStopNode);\n        const tagStart = indentation + `<${tagName}${attStr}`;\n\n        // If this is a stopNode, get raw content without processing\n        let tagValue;\n        if (isStopNode) {\n            tagValue = getRawContent(tagObj[tagName], options);\n        } else {\n\n            tagValue = arrToStr(tagObj[tagName], options, newIdentation, matcher, stopNodeExpressions);\n        }\n\n        if (options.unpairedTags.indexOf(tagName) !== -1) {\n            if (options.suppressUnpairedNode) xmlStr += tagStart + \">\";\n            else xmlStr += tagStart + \"/>\";\n        } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n            xmlStr += tagStart + \"/>\";\n        } else if (tagValue && tagValue.endsWith(\">\")) {\n            xmlStr += tagStart + `>${tagValue}${indentation}</${tagName}>`;\n        } else {\n            xmlStr += tagStart + \">\";\n            if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"</\"))) {\n                xmlStr += indentation + options.indentBy + tagValue + indentation;\n            } else {\n                xmlStr += tagValue;\n            }\n            xmlStr += `</${tagName}>`;\n        }\n        isPreviousElementTag = true;\n\n        // Pop tag from matcher\n        matcher.pop();\n    }\n\n    return xmlStr;\n}\n\n/**\n * Extract attribute values from the \":@\" object and return as plain object\n * for passing to matcher.push()\n */\nfunction extractAttributeValues(attrMap, options) {\n    if (!attrMap || options.ignoreAttributes) return null;\n\n    const attrValues = {};\n    let hasAttrs = false;\n\n    for (let attr in attrMap) {\n        if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;\n        // Remove the attribute prefix to get clean attribute name\n        const cleanAttrName = attr.startsWith(options.attributeNamePrefix)\n            ? attr.substr(options.attributeNamePrefix.length)\n            : attr;\n        attrValues[cleanAttrName] = attrMap[attr];\n        hasAttrs = true;\n    }\n\n    return hasAttrs ? attrValues : null;\n}\n\n/**\n * Extract raw content from a stopNode without any processing\n * This preserves the content exactly as-is, including special characters\n */\nfunction getRawContent(arr, options) {\n    if (!Array.isArray(arr)) {\n        // Non-array values return as-is\n        if (arr !== undefined && arr !== null) {\n            return arr.toString();\n        }\n        return \"\";\n    }\n\n    let content = \"\";\n    for (let i = 0; i < arr.length; i++) {\n        const item = arr[i];\n        const tagName = propName(item);\n\n        if (tagName === options.textNodeName) {\n            // Raw text content - NO processing, NO entity replacement\n            content += item[tagName];\n        } else if (tagName === options.cdataPropName) {\n            // CDATA content\n            content += item[tagName][0][options.textNodeName];\n        } else if (tagName === options.commentPropName) {\n            // Comment content\n            content += item[tagName][0][options.textNodeName];\n        } else if (tagName && tagName[0] === \"?\") {\n            // Processing instruction - skip for stopNodes\n            continue;\n        } else if (tagName) {\n            // Nested tags within stopNode\n            // Recursively get raw content and reconstruct the tag\n            // For stopNodes, we don't process attributes either\n            const attStr = attr_to_str_raw(item[\":@\"], options);\n            const nestedContent = getRawContent(item[tagName], options);\n\n            if (!nestedContent || nestedContent.length === 0) {\n                content += `<${tagName}${attStr}/>`;\n            } else {\n                content += `<${tagName}${attStr}>${nestedContent}</${tagName}>`;\n            }\n        }\n    }\n    return content;\n}\n\n/**\n * Build attribute string for stopNodes - NO entity replacement\n */\nfunction attr_to_str_raw(attrMap, options) {\n    let attrStr = \"\";\n    if (attrMap && !options.ignoreAttributes) {\n        for (let attr in attrMap) {\n            if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;\n            // For stopNodes, use raw value without processing\n            let attrVal = attrMap[attr];\n            if (attrVal === true && options.suppressBooleanAttributes) {\n                attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n            } else {\n                attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n            }\n        }\n    }\n    return attrStr;\n}\n\nfunction propName(obj) {\n    const keys = Object.keys(obj);\n    for (let i = 0; i < keys.length; i++) {\n        const key = keys[i];\n        if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;\n        if (key !== \":@\") return key;\n    }\n}\n\nfunction attr_to_str(attrMap, options, isStopNode) {\n    let attrStr = \"\";\n    if (attrMap && !options.ignoreAttributes) {\n        for (let attr in attrMap) {\n            if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;\n            let attrVal;\n\n            if (isStopNode) {\n                // For stopNodes, use raw value without any processing\n                attrVal = attrMap[attr];\n            } else {\n                // Normal processing: apply attributeValueProcessor and entity replacement\n                attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n                attrVal = replaceEntitiesValue(attrVal, options);\n            }\n\n            if (attrVal === true && options.suppressBooleanAttributes) {\n                attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n            } else {\n                attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n            }\n        }\n    }\n    return attrStr;\n}\n\nfunction checkStopNode(matcher, stopNodeExpressions) {\n    if (!stopNodeExpressions || stopNodeExpressions.length === 0) return false;\n\n    for (let i = 0; i < stopNodeExpressions.length; i++) {\n        if (matcher.matches(stopNodeExpressions[i])) {\n            return true;\n        }\n    }\n    return false;\n}\n\nfunction replaceEntitiesValue(textValue, options) {\n    if (textValue && textValue.length > 0 && options.processEntities) {\n        for (let i = 0; i < options.entities.length; i++) {\n            const entity = options.entities[i];\n            textValue = textValue.replace(entity.regex, entity.val);\n        }\n    }\n    return textValue;\n}\n\nfunction cdataVal(val) {\n\n}\n\nfunction commentVal(val) {\n\n}","'use strict';\n//parse Empty Node as self closing node\nimport buildFromOrderedJs from './orderedJs2Xml.js';\nimport getIgnoreAttributesFn from \"./ignoreAttributes.js\";\nimport { Expression, Matcher } from 'path-expression-matcher';\n\nconst defaultOptions = {\n  attributeNamePrefix: '@_',\n  attributesGroupName: false,\n  textNodeName: '#text',\n  ignoreAttributes: true,\n  cdataPropName: false,\n  format: false,\n  indentBy: '  ',\n  suppressEmptyNode: false,\n  suppressUnpairedNode: true,\n  suppressBooleanAttributes: true,\n  tagValueProcessor: function (key, a) {\n    return a;\n  },\n  attributeValueProcessor: function (attrName, a) {\n    return a;\n  },\n  preserveOrder: false,\n  commentPropName: false,\n  unpairedTags: [],\n  entities: [\n    { regex: new RegExp(\"&\", \"g\"), val: \"&amp;\" },//it must be on top\n    { regex: new RegExp(\">\", \"g\"), val: \"&gt;\" },\n    { regex: new RegExp(\"<\", \"g\"), val: \"&lt;\" },\n    { regex: new RegExp(\"\\'\", \"g\"), val: \"&apos;\" },\n    { regex: new RegExp(\"\\\"\", \"g\"), val: \"&quot;\" }\n  ],\n  processEntities: true,\n  stopNodes: [],\n  // transformTagName: false,\n  // transformAttributeName: false,\n  oneListGroup: false,\n  maxNestedTags: 100,\n  jPath: true  // When true, callbacks receive string jPath; when false, receive Matcher instance\n};\n\nexport default function Builder(options) {\n  this.options = Object.assign({}, defaultOptions, options);\n\n  // Convert old-style stopNodes for backward compatibility\n  // Old syntax: \"*.tag\" meant \"tag anywhere in tree\"\n  // New syntax: \"..tag\" means \"tag anywhere in tree\"\n  if (this.options.stopNodes && Array.isArray(this.options.stopNodes)) {\n    this.options.stopNodes = this.options.stopNodes.map(node => {\n      if (typeof node === 'string' && node.startsWith('*.')) {\n        // Convert old wildcard syntax to deep wildcard\n        return '..' + node.substring(2);\n      }\n      return node;\n    });\n  }\n\n  // Pre-compile stopNode expressions for pattern matching\n  this.stopNodeExpressions = [];\n  if (this.options.stopNodes && Array.isArray(this.options.stopNodes)) {\n    for (let i = 0; i < this.options.stopNodes.length; i++) {\n      const node = this.options.stopNodes[i];\n      if (typeof node === 'string') {\n        this.stopNodeExpressions.push(new Expression(node));\n      } else if (node instanceof Expression) {\n        this.stopNodeExpressions.push(node);\n      }\n    }\n  }\n\n  if (this.options.ignoreAttributes === true || this.options.attributesGroupName) {\n    this.isAttribute = function (/*a*/) {\n      return false;\n    };\n  } else {\n    this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes)\n    this.attrPrefixLen = this.options.attributeNamePrefix.length;\n    this.isAttribute = isAttribute;\n  }\n\n  this.processTextOrObjNode = processTextOrObjNode\n\n  if (this.options.format) {\n    this.indentate = indentate;\n    this.tagEndChar = '>\\n';\n    this.newLine = '\\n';\n  } else {\n    this.indentate = function () {\n      return '';\n    };\n    this.tagEndChar = '>';\n    this.newLine = '';\n  }\n}\n\nBuilder.prototype.build = function (jObj) {\n  if (this.options.preserveOrder) {\n    return buildFromOrderedJs(jObj, this.options);\n  } else {\n    if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {\n      jObj = {\n        [this.options.arrayNodeName]: jObj\n      }\n    }\n    // Initialize matcher for path tracking\n    const matcher = new Matcher();\n    return this.j2x(jObj, 0, matcher).val;\n  }\n};\n\nBuilder.prototype.j2x = function (jObj, level, matcher) {\n  let attrStr = '';\n  let val = '';\n  if (this.options.maxNestedTags && matcher.getDepth() >= this.options.maxNestedTags) {\n    throw new Error(\"Maximum nested tags exceeded\");\n  }\n  // Get jPath based on option: string for backward compatibility, or Matcher for new features\n  const jPath = this.options.jPath ? matcher.toString() : matcher;\n\n  // Check if current node is a stopNode (will be used for attribute encoding)\n  const isCurrentStopNode = this.checkStopNode(matcher);\n\n  for (let key in jObj) {\n    if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue;\n    if (typeof jObj[key] === 'undefined') {\n      // supress undefined node only if it is not an attribute\n      if (this.isAttribute(key)) {\n        val += '';\n      }\n    } else if (jObj[key] === null) {\n      // null attribute should be ignored by the attribute list, but should not cause the tag closing\n      if (this.isAttribute(key)) {\n        val += '';\n      } else if (key === this.options.cdataPropName) {\n        val += '';\n      } else if (key[0] === '?') {\n        val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n      } else {\n        val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n      }\n      // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n    } else if (jObj[key] instanceof Date) {\n      val += this.buildTextValNode(jObj[key], key, '', level, matcher);\n    } else if (typeof jObj[key] !== 'object') {\n      //premitive type\n      const attr = this.isAttribute(key);\n      if (attr && !this.ignoreAttributesFn(attr, jPath)) {\n        attrStr += this.buildAttrPairStr(attr, '' + jObj[key], isCurrentStopNode);\n      } else if (!attr) {\n        //tag value\n        if (key === this.options.textNodeName) {\n          let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n          val += this.replaceEntitiesValue(newval);\n        } else {\n          // Check if this is a stopNode before building\n          matcher.push(key);\n          const isStopNode = this.checkStopNode(matcher);\n          matcher.pop();\n\n          if (isStopNode) {\n            // Build as raw content without encoding\n            const textValue = '' + jObj[key];\n            if (textValue === '') {\n              val += this.indentate(level) + '<' + key + this.closeTag(key) + this.tagEndChar;\n            } else {\n              val += this.indentate(level) + '<' + key + '>' + textValue + '</' + key + this.tagEndChar;\n            }\n          } else {\n            val += this.buildTextValNode(jObj[key], key, '', level, matcher);\n          }\n        }\n      }\n    } else if (Array.isArray(jObj[key])) {\n      //repeated nodes\n      const arrLen = jObj[key].length;\n      let listTagVal = \"\";\n      let listTagAttr = \"\";\n      for (let j = 0; j < arrLen; j++) {\n        const item = jObj[key][j];\n        if (typeof item === 'undefined') {\n          // supress undefined node\n        } else if (item === null) {\n          if (key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n          else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n          // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n        } else if (typeof item === 'object') {\n          if (this.options.oneListGroup) {\n            // Push tag to matcher before recursive call\n            matcher.push(key);\n            const result = this.j2x(item, level + 1, matcher);\n            // Pop tag from matcher after recursive call\n            matcher.pop();\n\n            listTagVal += result.val;\n            if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {\n              listTagAttr += result.attrStr\n            }\n          } else {\n            listTagVal += this.processTextOrObjNode(item, key, level, matcher)\n          }\n        } else {\n          if (this.options.oneListGroup) {\n            let textValue = this.options.tagValueProcessor(key, item);\n            textValue = this.replaceEntitiesValue(textValue);\n            listTagVal += textValue;\n          } else {\n            // Check if this is a stopNode before building\n            matcher.push(key);\n            const isStopNode = this.checkStopNode(matcher);\n            matcher.pop();\n\n            if (isStopNode) {\n              // Build as raw content without encoding\n              const textValue = '' + item;\n              if (textValue === '') {\n                listTagVal += this.indentate(level) + '<' + key + this.closeTag(key) + this.tagEndChar;\n              } else {\n                listTagVal += this.indentate(level) + '<' + key + '>' + textValue + '</' + key + this.tagEndChar;\n              }\n            } else {\n              listTagVal += this.buildTextValNode(item, key, '', level, matcher);\n            }\n          }\n        }\n      }\n      if (this.options.oneListGroup) {\n        listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);\n      }\n      val += listTagVal;\n    } else {\n      //nested node\n      if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n        const Ks = Object.keys(jObj[key]);\n        const L = Ks.length;\n        for (let j = 0; j < L; j++) {\n          attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]], isCurrentStopNode);\n        }\n      } else {\n        val += this.processTextOrObjNode(jObj[key], key, level, matcher)\n      }\n    }\n  }\n  return { attrStr: attrStr, val: val };\n};\n\nBuilder.prototype.buildAttrPairStr = function (attrName, val, isStopNode) {\n  if (!isStopNode) {\n    val = this.options.attributeValueProcessor(attrName, '' + val);\n    val = this.replaceEntitiesValue(val);\n  }\n  if (this.options.suppressBooleanAttributes && val === \"true\") {\n    return ' ' + attrName;\n  } else return ' ' + attrName + '=\"' + val + '\"';\n}\n\nfunction processTextOrObjNode(object, key, level, matcher) {\n  // Extract attributes to pass to matcher\n  const attrValues = this.extractAttributes(object);\n\n  // Push tag to matcher before recursion WITH attributes\n  matcher.push(key, attrValues);\n\n  // Check if this entire node is a stopNode\n  const isStopNode = this.checkStopNode(matcher);\n\n  if (isStopNode) {\n    // For stopNodes, build raw content without entity encoding\n    const rawContent = this.buildRawContent(object);\n    const attrStr = this.buildAttributesForStopNode(object);\n    matcher.pop();\n    return this.buildObjectNode(rawContent, key, attrStr, level);\n  }\n\n  const result = this.j2x(object, level + 1, matcher);\n  // Pop tag from matcher after recursion\n  matcher.pop();\n\n  if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n    return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level, matcher);\n  } else {\n    return this.buildObjectNode(result.val, key, result.attrStr, level);\n  }\n}\n\n// Helper method to extract attributes from an object\nBuilder.prototype.extractAttributes = function (obj) {\n  if (!obj || typeof obj !== 'object') return null;\n\n  const attrValues = {};\n  let hasAttrs = false;\n\n  // Check for attributesGroupName (when attributes are grouped)\n  if (this.options.attributesGroupName && obj[this.options.attributesGroupName]) {\n    const attrGroup = obj[this.options.attributesGroupName];\n    for (let attrKey in attrGroup) {\n      if (!Object.prototype.hasOwnProperty.call(attrGroup, attrKey)) continue;\n      // Remove attribute prefix if present\n      const cleanKey = attrKey.startsWith(this.options.attributeNamePrefix)\n        ? attrKey.substring(this.options.attributeNamePrefix.length)\n        : attrKey;\n      attrValues[cleanKey] = attrGroup[attrKey];\n      hasAttrs = true;\n    }\n  } else {\n    // Look for individual attributes (prefixed with attributeNamePrefix)\n    for (let key in obj) {\n      if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;\n      const attr = this.isAttribute(key);\n      if (attr) {\n        attrValues[attr] = obj[key];\n        hasAttrs = true;\n      }\n    }\n  }\n\n  return hasAttrs ? attrValues : null;\n};\n\n// Build raw content for stopNode without entity encoding\nBuilder.prototype.buildRawContent = function (obj) {\n  if (typeof obj === 'string') {\n    return obj; // Already a string, return as-is\n  }\n\n  if (typeof obj !== 'object' || obj === null) {\n    return String(obj);\n  }\n\n  // Check if this is a stopNode data from parser: { \"#text\": \"raw xml\", \"@_attr\": \"val\" }\n  if (obj[this.options.textNodeName] !== undefined) {\n    return obj[this.options.textNodeName]; // Return raw text without encoding\n  }\n\n  // Build raw XML from nested structure\n  let content = '';\n\n  for (let key in obj) {\n    if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;\n\n    // Skip attributes\n    if (this.isAttribute(key)) continue;\n    if (this.options.attributesGroupName && key === this.options.attributesGroupName) continue;\n\n    const value = obj[key];\n\n    if (key === this.options.textNodeName) {\n      content += value; // Raw text\n    } else if (Array.isArray(value)) {\n      // Array of same tag\n      for (let item of value) {\n        if (typeof item === 'string' || typeof item === 'number') {\n          content += `<${key}>${item}</${key}>`;\n        } else if (typeof item === 'object' && item !== null) {\n          const nestedContent = this.buildRawContent(item);\n          const nestedAttrs = this.buildAttributesForStopNode(item);\n          if (nestedContent === '') {\n            content += `<${key}${nestedAttrs}/>`;\n          } else {\n            content += `<${key}${nestedAttrs}>${nestedContent}</${key}>`;\n          }\n        }\n      }\n    } else if (typeof value === 'object' && value !== null) {\n      // Nested object\n      const nestedContent = this.buildRawContent(value);\n      const nestedAttrs = this.buildAttributesForStopNode(value);\n      if (nestedContent === '') {\n        content += `<${key}${nestedAttrs}/>`;\n      } else {\n        content += `<${key}${nestedAttrs}>${nestedContent}</${key}>`;\n      }\n    } else {\n      // Primitive value\n      content += `<${key}>${value}</${key}>`;\n    }\n  }\n\n  return content;\n};\n\n// Build attribute string for stopNode (no entity encoding)\nBuilder.prototype.buildAttributesForStopNode = function (obj) {\n  if (!obj || typeof obj !== 'object') return '';\n\n  let attrStr = '';\n\n  // Check for attributesGroupName (when attributes are grouped)\n  if (this.options.attributesGroupName && obj[this.options.attributesGroupName]) {\n    const attrGroup = obj[this.options.attributesGroupName];\n    for (let attrKey in attrGroup) {\n      if (!Object.prototype.hasOwnProperty.call(attrGroup, attrKey)) continue;\n      const cleanKey = attrKey.startsWith(this.options.attributeNamePrefix)\n        ? attrKey.substring(this.options.attributeNamePrefix.length)\n        : attrKey;\n      const val = attrGroup[attrKey];\n      if (val === true && this.options.suppressBooleanAttributes) {\n        attrStr += ' ' + cleanKey;\n      } else {\n        attrStr += ' ' + cleanKey + '=\"' + val + '\"'; // No encoding for stopNode\n      }\n    }\n  } else {\n    // Look for individual attributes\n    for (let key in obj) {\n      if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;\n      const attr = this.isAttribute(key);\n      if (attr) {\n        const val = obj[key];\n        if (val === true && this.options.suppressBooleanAttributes) {\n          attrStr += ' ' + attr;\n        } else {\n          attrStr += ' ' + attr + '=\"' + val + '\"'; // No encoding for stopNode\n        }\n      }\n    }\n  }\n\n  return attrStr;\n};\n\nBuilder.prototype.buildObjectNode = function (val, key, attrStr, level) {\n  if (val === \"\") {\n    if (key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;\n    else {\n      return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n    }\n  } else {\n\n    let tagEndExp = '</' + key + this.tagEndChar;\n    let piClosingChar = \"\";\n\n    if (key[0] === \"?\") {\n      piClosingChar = \"?\";\n      tagEndExp = \"\";\n    }\n\n    // attrStr is an empty string in case the attribute came as undefined or null\n    if ((attrStr || attrStr === '') && val.indexOf('<') === -1) {\n      return (this.indentate(level) + '<' + key + attrStr + piClosingChar + '>' + val + tagEndExp);\n    } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n      return this.indentate(level) + `<!--${val}-->` + this.newLine;\n    } else {\n      return (\n        this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar +\n        val +\n        this.indentate(level) + tagEndExp);\n    }\n  }\n}\n\nBuilder.prototype.closeTag = function (key) {\n  let closeTag = \"\";\n  if (this.options.unpairedTags.indexOf(key) !== -1) { //unpaired\n    if (!this.options.suppressUnpairedNode) closeTag = \"/\"\n  } else if (this.options.suppressEmptyNode) { //empty\n    closeTag = \"/\";\n  } else {\n    closeTag = `></${key}`\n  }\n  return closeTag;\n}\n\nBuilder.prototype.checkStopNode = function (matcher) {\n  if (!this.stopNodeExpressions || this.stopNodeExpressions.length === 0) return false;\n\n  for (let i = 0; i < this.stopNodeExpressions.length; i++) {\n    if (matcher.matches(this.stopNodeExpressions[i])) {\n      return true;\n    }\n  }\n  return false;\n}\n\nfunction buildEmptyObjNode(val, key, attrStr, level) {\n  if (val !== '') {\n    return this.buildObjectNode(val, key, attrStr, level);\n  } else {\n    if (key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;\n    else {\n      return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;\n      // return this.buildTagStr(level,key, attrStr);\n    }\n  }\n}\n\nBuilder.prototype.buildTextValNode = function (val, key, attrStr, level, matcher) {\n  if (this.options.cdataPropName !== false && key === this.options.cdataPropName) {\n    const safeVal = String(val).replace(/\\]\\]>/g, ']]]]><![CDATA[>');\n    return this.indentate(level) + `<![CDATA[${safeVal}]]>` + this.newLine;\n  } else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n    const safeVal = String(val)\n      .replace(/--/g, '- -')   // -- is illegal anywhere in comment content\n      .replace(/-$/, '- ');    // trailing - would form -- with the closing -->\n    return this.indentate(level) + `<!--${safeVal}-->` + this.newLine;\n  } else if (key[0] === \"?\") {//PI tag\n    return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;\n  } else {\n    // Normal processing: apply tagValueProcessor and entity replacement\n    let textValue = this.options.tagValueProcessor(key, val);\n    textValue = this.replaceEntitiesValue(textValue);\n\n    if (textValue === '') {\n      return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n    } else {\n      return this.indentate(level) + '<' + key + attrStr + '>' +\n        textValue +\n        '</' + key + this.tagEndChar;\n    }\n  }\n}\n\nBuilder.prototype.replaceEntitiesValue = function (textValue) {\n  if (textValue && textValue.length > 0 && this.options.processEntities) {\n    for (let i = 0; i < this.options.entities.length; i++) {\n      const entity = this.options.entities[i];\n      textValue = textValue.replace(entity.regex, entity.val);\n    }\n  }\n  return textValue;\n}\n\nfunction indentate(level) {\n  return this.options.indentBy.repeat(level);\n}\n\nfunction isAttribute(name /*, options*/) {\n  if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) {\n    return name.substr(this.attrPrefixLen);\n  } else {\n    return false;\n  }\n}","export default function getIgnoreAttributesFn(ignoreAttributes) {\n    if (typeof ignoreAttributes === 'function') {\n        return ignoreAttributes\n    }\n    if (Array.isArray(ignoreAttributes)) {\n        return (attrName) => {\n            for (const pattern of ignoreAttributes) {\n                if (typeof pattern === 'string' && attrName === pattern) {\n                    return true\n                }\n                if (pattern instanceof RegExp && pattern.test(attrName)) {\n                    return true\n                }\n            }\n        }\n    }\n    return () => false\n}","// Re-export from fast-xml-builder for backward compatibility\nimport XMLBuilder from 'fast-xml-builder';\nexport default XMLBuilder;\n\n// If there are any named exports you also want to re-export:\nexport * from 'fast-xml-builder';"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Expression","constructor","pattern","options","data","separator","segments","_parse","_hasDeepWildcard","some","seg","type","_hasAttributeCondition","undefined","attrName","_hasPositionSelector","position","i","currentPart","length","trim","push","_parseSegment","part","segment","bracketContent","withoutBrackets","bracketMatch","match","content","slice","namespace","tag","tagAndPosition","includes","nsIndex","indexOf","substring","Error","positionMatch","colonIndex","lastIndexOf","tagPart","posPart","test","eqIndex","attrValue","nthMatch","positionValue","parseInt","hasDeepWildcard","hasAttributeCondition","hasPositionSelector","toString","MatcherView","matcher","_matcher","getCurrentTag","path","getCurrentNamespace","getAttrValue","values","hasAttr","current","getPosition","getCounter","counter","getIndex","getDepth","includeNamespace","toArray","map","n","matches","expression","matchesAny","exprSet","Matcher","siblingStacks","_pathStringCache","_view","tagName","attrValues","currentLevel","Map","siblings","siblingKey","count","set","node","pop","updateCurrent","sep","result","join","reset","_matchWithDeepWildcard","_matchSimple","_matchSegment","pathIdx","segIdx","nextSeg","found","isCurrentNode","String","snapshot","restore","readOnly","toXml","jArray","indentation","format","indentBy","stopNodeExpressions","stopNodes","Array","isArray","arrToStr","arr","xmlStr","isPreviousElementTag","maxNestedTags","text","replaceEntitiesValue","tagObj","propName","extractAttributeValues","isStopNode","checkStopNode","textNodeName","tagText","tagValueProcessor","cdataPropName","val","replace","commentPropName","attStr","attr_to_str","tempInd","piTextNodeName","newIdentation","tagStart","tagValue","getRawContent","unpairedTags","suppressUnpairedNode","suppressEmptyNode","endsWith","attrMap","ignoreAttributes","hasAttrs","attr","startsWith","attributeNamePrefix","substr","item","attr_to_str_raw","nestedContent","attrStr","attrVal","suppressBooleanAttributes","keys","attributeValueProcessor","textValue","processEntities","entities","entity","regex","defaultOptions","attributesGroupName","a","preserveOrder","RegExp","oneListGroup","jPath","Builder","assign","isAttribute","ignoreAttributesFn","attrPrefixLen","processTextOrObjNode","indentate","tagEndChar","newLine","object","level","extractAttributes","rawContent","buildRawContent","buildAttributesForStopNode","buildObjectNode","j2x","buildTextValNode","repeat","name","build","jObj","buildFromOrderedJs","arrayNodeName","isCurrentStopNode","Date","buildAttrPairStr","newval","closeTag","arrLen","listTagVal","listTagAttr","j","Ks","L","attrGroup","attrKey","nestedAttrs","cleanKey","tagEndExp","piClosingChar","safeVal"],"sourceRoot":""}