/* Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ if(!dojo._hasResource["dojox.jsonPath.query"]){dojo._hasResource["dojox.jsonPath.query"]=true;dojo.provide("dojox.jsonPath.query");dojox.jsonPath.query=function(_1,_2,_3){var re=dojox.jsonPath._regularExpressions;if(!_3){_3={};}var _4=[];function _5(i){return _4[i];};var _6;if(_3.resultType=="PATH"&&_3.evalType=="RESULT"){throw Error("RESULT based evaluation not supported with PATH based results");}var P={resultType:_3.resultType||"VALUE",normalize:function(_7){var _8=[];_7=_7.replace(/'([^']|'')*'/g,function(t){return "_str("+(_4.push(eval(t))-1)+")";});var ll=-1;while(ll!=_8.length){ll=_8.length;_7=_7.replace(/(\??\([^\(\)]*\))/g,function($0){return "#"+(_8.push($0)-1);});}_7=_7.replace(/[\['](#[0-9]+)[\]']/g,"[$1]").replace(/'?\.'?|\['?/g,";").replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,"");ll=-1;while(ll!=_7){ll=_7;_7=_7.replace(/#([0-9]+)/g,function($0,$1){return _8[$1];});}return _7.split(";");},asPaths:function(_9){for(var j=0;j<_9.length;j++){var p="$";var x=_9[j];for(var i=1,n=x.length;i