/*
 * Copyright (c) 2018, 2026, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
function _find(members,a,index,context){var j,pos,c,data;var member=a[index];for(j=0;j<members.length;j++){if(members[j].name===member){if(index+1>=a.length){pos=members[j].pos;data=context.data;c=data.charAt(pos.index);if(c==="\""||c==="'")pos.index++;return pos}else{return _find(members[j].value.members,a,index+1,context)}}}context.utils.msgLib.assert("helper 'json-prop-pos' failure for '"+a.join(".")+"'  <- "+context.filepath)};module.exports=function(context,propName){if(context.suppData.msg){return{line:0,col:0,index:0}}var ast=context.suppData.ast;var members=ast.members;var a,ret;var a=propName.split(".");a.forEach(function(v,index){a[index]=a[index].trim()});ret=_find(members,a,0,context);if(!ret){ret={row:0,col:0,index:0}}return ret};