/*
	Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

//>>built
define("dojo/selector/lite",["../has","../_base/kernel"],function(q,v){var n=document.createElement("div"),t=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector,w=n.querySelectorAll,x=/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g;q.add("dom-matches-selector",!!t);q.add("dom-qsa",!!w);var u=function(f,b){if(y&&-1<f.indexOf(","))return y(f,b);var e=b?b.ownerDocument||b:v.doc||document,d=(w?/^([\w]*)#([\w\-]+$)|^(\.)([\w\-\*]+$)|^(\w+$)/:/^([\w]*)#([\w\-]+)(?:\s+(.*))?$|(?:^|(>|.+\s+))([\w\-\*]+)(\S*$)/).exec(f);
b=b||e;if(d){var l=8===q("ie")&&q("quirks")?b.nodeType===e.nodeType:null!==b.parentNode&&9!==b.nodeType&&b.parentNode===e;if(d[2]&&l){var g=v.byId?v.byId(d[2],e):e.getElementById(d[2]);if(!g||d[1]&&d[1]!=g.tagName.toLowerCase())return[];if(b!=e)for(e=g;e!=b;)if(e=e.parentNode,!e)return[];return d[3]?u(d[3],g):[g]}if(d[3]&&b.getElementsByClassName)return b.getElementsByClassName(d[4]);if(d[5])if(g=b.getElementsByTagName(d[5]),d[4]||d[6])f=(d[4]||"")+d[6];else return g}if(w)return 1===b.nodeType&&"object"!==
b.nodeName.toLowerCase()?z(b,f,b.querySelectorAll):b.querySelectorAll(f);g||(g=b.getElementsByTagName("*"));d=[];e=0;for(l=g.length;e<l;e++){var h=g[e];1==h.nodeType&&A(h,f,b)&&d.push(h)}return d},z=function(f,b,e){var d=f,l=f.getAttribute("id"),g=l||"__dojo__",h=f.parentNode,p=/^\s*[+~]/.test(b);if(p&&!h)return[];l?g=g.replace(/'/g,"\\$\x26"):f.setAttribute("id",g);p&&h&&(f=f.parentNode);b=b.match(x);for(h=0;h<b.length;h++)b[h]="[id\x3d'"+g+"'] "+b[h];b=b.join(",");try{return e.call(f,b)}finally{l||
d.removeAttribute("id")}};if(!q("dom-matches-selector"))var A=function(){function f(c,a,k){var m=a.charAt(0);if('"'==m||"'"==m)a=a.slice(1,-1);a=a.replace(/\\/g,"");var B=h[k||""];return function(r){return(r=r.getAttribute(c))&&B(r,a)}}function b(c){return function(a,k){for(;(a=a.parentNode)!=k;)if(c(a,k))return!0}}function e(c){return function(a,k){a=a.parentNode;return c?a!=k&&c(a,k):a==k}}function d(c,a){return c?function(k,m){return a(k)&&c(k,m)}:a}var l="div"==n.tagName?"toLowerCase":"toUpperCase",
g={"":function(c){c=c[l]();return function(a){return a.tagName==c}},".":function(c){var a=" "+c+" ";return function(k){return-1<k.className.indexOf(c)&&-1<(" "+k.className+" ").indexOf(a)}},"#":function(c){return function(a){return a.id==c}}},h={"^\x3d":function(c,a){return 0==c.indexOf(a)},"*\x3d":function(c,a){return-1<c.indexOf(a)},"$\x3d":function(c,a){return c.substring(c.length-a.length,c.length)==a},"~\x3d":function(c,a){return-1<(" "+c+" ").indexOf(" "+a+" ")},"|\x3d":function(c,a){return 0==
(c+"-").indexOf(a+"-")},"\x3d":function(c,a){return c==a},"":function(c,a){return!0}},p={};return function(c,a,k){var m=p[a];if(!m){if(a.replace(/(?:\s*([> ])\s*)|(#|\.)?((?:\\.|[\w-])+)|\[\s*([\w-]+)\s*(.?=)?\s*("(?:\\.|[^"])+"|'(?:\\.|[^'])+'|(?:\\.|[^\]])*)\s*\]/g,function(B,r,E,C,D,F,G){C?m=d(m,g[E||""](C.replace(/\\/g,""))):r?m=(" "==r?b:e)(m):D&&(m=d(m,f(D,G,F)));return""}))throw Error("Syntax error in query");if(!m)return!0;p[a]=m}return m(c,k)}}();if(!q("dom-qsa"))var y=function(f,b){for(var e=
f.match(x),d=[],l=0;l<e.length;l++){f=new String(e[l].replace(/\s*$/,""));f.indexOf=escape;for(var g=u(f,b),h=0,p=g.length;h<p;h++){var c=g[h];d[c.sourceIndex]=c}}e=[];for(l in d)e.push(d[l]);return e};u.match=t?function(f,b,e){return e&&9!=e.nodeType?z(e,b,function(d){return t.call(f,d)}):t.call(f,b)}:A;return u});